You put a long question there Akshya, however, I'll try to explain...
Let's consider the below Job, which defines a GDG Base with limit=5 and NOEMPTY & SCRATCH are mentioned on DEFINE statement:
Code: Select all
//GDGIDXX1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DEFINE GDG(NAME(HLQ.DATA.GDGGROUP) -
LIMIT(5) -
NOEMPTY -
SCRATCH)
/*
//
This uses IDCAMS utility program to define a GDG base called HLQ.DATA.GDGGROUP that will consist of 5 generations.
The NOEMPTY parameter specifies that when the FIVE generation limit is reached the oldest generation data set will be deleted. The remaining generation data sets will be retained. An EMPTY parameter specifies that when the limit is reached the FIVE current files will be deleted and the process will start again with the new file. The SCRATCH parameter specifies that the oldest generation data set will be uncataloged and deleted when the generation limit is exceeded.