Professional Documents
Culture Documents
Generation Data Group
Generation Data Group
With normal data set names: With generation data group names:
ACCT.DEC.DATA ACCT.DATA(0)
ACCT.NOV.DATA ACCT.DATA(-1)
ACCT.OCT.DATA ACCT.DATA(-2)
DSN=data-set-name(+1)
ACCT.DATA(+1) ACCT.DATA(0)
ACCT.DATA(0) ACCT.DATA(-1)
ACCT.DATA(-1) ACCT.DATA(-2)
ACCT.DATA(-2) Deleted--if only 3 generations
were to be kept
Name you use Name you use Actual name (used during
during the job: after the job: and after the job):
name.GnnnnVvv
// EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG ( -
NAME (X2222.ANNUAL.DATA) -
LIMIT(12) -
NOEMPTY -
SCRATCH )
/*
DEFINE GDG ( -
(The items following GDG are enclosed in parentheses.
The - indi-
cates that the statement is continued.)
NAME (generation-data-group-name) -
LIMIT(generations) -
(The number of generations to be kept. The value can
be 1 through
255.)
NOEMPTY -
(This tells what to do with the old generations.
Coding NOEMPTY
requests that the LIMIT number of newest generations
be kept and
the remainder be deleted. If you code EMPTY instead,
all the old
generations are deleted, and only the (+1) generation
is kept when
the LIMIT is reached.)
NOEMPTY - When the LIMIT number is exceeded, NOEMPTY keeps the
LIMIT
number of newest generations.
EMPTY - When the LIMIT number is exceeded, EMPTY keeps only the
most recent generation.