GDG Notes
GDG Notes
GDG Notes
Generation data sets are a special form of catalogued data set. Several generations of a
data set are kept with the data set name varying only in the generation number.
Generation data sets may be retrieved and created using a generation number that is
relative to the latest catalogued generation prior to the start of the job. For example, the
latest catalogued generation may be referenced by specifying a zero in parentheses. The
previous generation may be specified by a minus one in parentheses. The first generation
created by this job may be referenced by a plus one in parentheses, the second generation
created by a plus two, and so forth.
+---------------------------------------------+
[ DSN=AM2P.BSL.TRANS(0) ]
[ DSN=AM1P.ADABAS.CLOG(-1) ]
[ DSN=AM3T.RSLS.MAST(+1) ]
[ DSN=AM1P.FM.KEY.MASTER(+2) ]
[ ]
[ Figure 79. Generation data sets ]
+---------------------------------------------+
Before creating a generation data set, have the Data Manager build a generation data
group base entry specifying the number of generations to be kept in the catalogue. The
Data Manager must also create and catalogue a model data set label, on the same volume
as the catalogue, to provide DSORG, RECFM, LRECL, and BLKSIZE information for
the generation data group.
It may be convenient for tape generation data sets to reserve a set of tapes with
contiguous tape numbers. At least five tapes should be used for this round robin. The
catalogue should have several more generations than there are tapes, even twice as many,
because it may become necessary to uncatalogue some generations at times.
There must be an extra DD statement in the job step that writes a new generation. This
DD statement will reference the data set that was last written on the tape on which you
are going to write the new generation. The relative generation number would be minus
nine for a set of ten tapes, or minus four for a set of five tapes. This technique will not
work for large data sets that require more than one tape volume.
+----------------------------------------------------------------------
------+
[ 0 1 1 2 2 3 3 4 4 5 5 6 6
7 ]
[ 12345678901234567890123456789012345678901234567890123456789012345678
9012 ]
[
]
[ //NEWMAST DD DSN=AM1P.CSIV.MAILING(+1),DISP=(NEW,CATLG,DELETE),
]
[ // UNIT=DISK,SPACE=(8460,(100,50),RLSE),
]
[ // DCB=(ISS.MODEL,RECFM=FB,LRECL=180,BLKSIZE=8460)
]
[
]
[ //DUMMY DD DSN=AM1P.GD.MASTER(-9),DISP=SHR
]
[ //INPUT DD DSN=AM1P.GD.MASTER(0),DISP=SHR
]
[ //OUTPUT DD DSN=AM1P.GD.MASTER(+1),DISP=(NEW,CATLG,DELETE),
]
[ // UNIT=AFF=DUMMY,VOL=REF=*.DUMMY,LABEL=(1,SL),
]
[ // DCB=AM1P.GD.MASTER
]
[
]
[ Figure 80. Disk and Tape generation data sets
]
+----------------------------------------------------------------------
------+