MF GDGcreation
MF GDGcreation
CHAPTER - 9
1. INTRODUCTION
2. CREATION OF GDG
3. USING GDG
5. DELETING GDG
1. INTRODUCTION
Every GDG data set has a Generation number and Version number
assigned
to each data set.
EXAMPLE -- 'MYLIB.LIB.TEST.G0001V00'
'MYLIB.LIB.TEST.G0002V00'
'MYLIB.LIB.TEST.G0003V00' <-- Current Version
2. CREATION OF GDG
Before using GDG , We need to create GDG index and model.
IDCAMS (the 'AMS' stands for Access Method Services), utility
is used to create GDG index.
CREATING MODEL
Once the index has been created, a model data set must be
created.
This model data set contains specifications for the DCB
subparameters
for all data sets that will belong to that GDG. Programmer can
override
this default values if he want.
EXAMPLE JCL
//MYJOB JOB (W983),'KRISHNA'
//STEP1 EXEC PGM=IDCAMS
//SYSIN DD *
DEFINE GDG( -
NAME(MYLIB.LIB.TEST) -
LIMIT(10) -
NOEMPTY -
SCRATCH)
//STEP2 EXEC PGM=IEFBR14
//MODEL1 DD DSN=MYLIB.LIB.TEST,
// DISP=(NEW,KEEP,DELETE),
// UNIT=SYSDA,
// SPACE(TRK,0),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800)
//
3. USING GDG
To use created GDG in our JCL, we need to use name
(with +1 for new generation) which we used in DEFINE
GDG command. (i.e. MYLIB.LIB.TEST)
EXAMPLE JCL
//MYJOB JOB (SD345),'KRISHNA REDDY'
//STEP1 EXEC PGM=COBPROG
//INFILE DD DSN=MYLIB.LIB.TEST(+1),
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(20,10),RLSE),
// DCB=(MODEL.DCB,RECFM=FB,
// LRECL=80,
// BLKSIZE=800)
//
//INFILE DD DSN=MYLIB.LIB.TEST(+1)
The DISP parameter must be set to CATLG for all new generation
data sets , DISP=(NEW,CATLG,DELETE)
The DSN and UNIT parameters must be coded for all new
generation data sets
5. DELETING GDG
A. +1
Q. Why?