Vous êtes sur la page 1sur 19

www.mainframes-online-training.weebly.

com Polsani Anil Kumar


Generation Data
Group GDG
JCL Training Class - 03
Generation Data
Groups(GDG)
A generation data group is a collection, or group, of
cataloged data sets having the same name and related
to one another. Each of these data sets is called a
generation data set or ,simply, a generation.
Each generation data set is distinguished by others by
the generation number.
The main advantage of using a GG is that the same
!"# can be reused without change.
Defning a GDG Base
$"A%& is the utility program that performs
functions vital to the virtual storage access
method'(&A%).
The command format *-
E+$,E GG 'PA-%&).
DEFINE GDG BAE
Defne GDG para!eters
Paramet
er
Meaning
,A%E GG name.
#$%$T The no. .f generations permitted
for this GG. The ma/ is 011.
E%PT2 $f empty is specified, all data sets
are to be
removed from the inde/ when
the limit is
reached.
,.E%PT2 ,.E%PT2 is the default.
.3,E- 4ser identification 'optional).
&"-AT"5 $f scratch is specified,the dataset is
scratched when the dataset is
removed from the inde/.
,.&"-AT
"5
,.&"-AT"5 is the default.
T. 'date) ataset retention period.
+.-'days) ataset retention period.
ALTE" GDG BAE
DELETE GDG BAE
www.mainframes-online-training.weebly.com Polsani Anil Kumar
#"$CED%"E
Instream & catalog
Intro&u'tion to #ro'e&ures
A !"# Procedure is a pre-written segment of code, by which we can
reuse the code of statements multiple times.
Procedure are of two types *

INSTRAM PROC & CATLOG PROC

&ynta/ for E/ecuting procedure *


66&TEP,A%E E7E" 8P-."9: procedure-name
Instrea! pro'e&ure
$n the instream procedure the set of code lies within the !.; and use it
in that <ob as many times as you want.
$nstream procedure should be defined , before any E7E" statement
$nstream procedure starts with P-." and ends with PE, statements
The ma/imum number of instream procedures you can have in any <ob
is =1
// JOB
// PROC
//STEP1
//STEP2
// PEND
// EXEC PROCNAME
CATAL$GED #"$CED%"E
Pre-written segment of code 'which is stored as an member of P&),
which we can use as many times as we want in any <ob in the system.
3hen we are e/ecuting "ATA#.GE P-."E4-E, we need to
specify where it is by using !"##$; statement , if not it will search for
the procedure in system procedure library &2&=.P-."#$;
FSS197T!AMPROC FSS197T!AM"CL
//PROCNAME PROC // JOB
//STEP1 // JCLLIB ORDER=FSS197.TEAM.PROC
//STEP2 // EXEC PROC NAME
$(erri&ing
There are times, when we want to change procedure statements
according to our re>uirement. There are three types of modification we
can do ,

S#mbo$i% o&erriding

Parameter o&erriding

'' (tatement o&erriding


&2%;.#$" PA-A%ETE-& * 4sually, the same !"# can be used by
different programmers to implement common tas?s, such as the
opening, reading, and writing of data sets. $n those cases , we can use
symbolic parameters. 4sing symbolic parameters we can pass value to a
parameter which is used in procedure. A symbolic parameter on a
statement is coded the parameter preceded by an ampersand.
&ynta/
668name: E7E" 8P-."9:procedure-name,symbolic-parameter9value
Parameter o&erriding
Parameter overriding is used to add or modify step level parameters
&ynta/ * PA-A%ETE-.&TEP,A%E9 new value
P-."E4-E &TATE%E,T @
66&TEP=A E7E" PG%9".;P-.G,T$%E9BA Parameter .verride
66%2&TEP E7E" P-."9%2P-.",T$%E.&TEP=A9CA
66&TEP=A E7E" PG%9".;P-.G,T$%E9BA Parameter Adding
66%2&TEP E7E" P-."9%2P-.",-EG$.,.&TEP=A91DK
66&TEP=A E7E" PG%9".;P-.G,T$%E9BA
66%2&TEP E7E" P-."9%2P-.",T$%E.&TEP=A9 onEt give any
value for this
This will nullifying that parameter value in procedure .
DD state!ent o(erri&ing
on statement &ynta/ for add6modify statements in a procedure
//name EXEC [PROC=]!"#e$%!e&name
//[PROCSTEPNAME].DDNAME DD a!ame'e!=(a)%e
//
3e can do following functions on E7E" statement in a procedure
using above synta/
- %odify e/isting parameter on statements within a procedure
- Add parameter to e/isting statement within a procedure
- Add statement to a <ob step
- ,ullify the effect of parameter on statement in a procedure
www.mainframes-online-training.weebly.com Polsani Anil Kumar
T)an* +ou

Vous aimerez peut-être aussi