Let's understand Mainframe
Home Tutorials Interview Q&A Quiz Mainframe Memes Contact us About us

Module 7: JCL GDG


Advantages of GDG

Without GDG Using GDG
Before each run, you need to change the name of the backup dataset in JCL
Example:-
Initial job ran on July created backup in PS file:-
PAYROLL.SALARY.MONTHLY.JULY
Now for AUGUST month we can’t use same JCL, thus modification needed in JCL to use dataset:-
PAYROLL.SALARY.MONTHLY.AUGUST
No need to change JCL between runs. Only need to specify:-
PAYROLL.SALARY.MONTHLY(+1)

Which will create
PAYROLL.SALARY.MONTHLY.G0001V00 in July
and
PAYROLL.SALARY.MONTHLY.G0002V00 in August
Keeping track of dataset names is very difficult as we have to manually remember It will maintain all generations of data sets thus making it easy for us to refer any generations
Need to manually delete older backup data sets It will delete/uncatalog older generations automatically

Rules for coding GDG

  • All datasets belonging to a GDG must have same DCB parameters such as record length, record format and so on.
  • Maximum of 255 datasets can exist within a GDG
  • GDGs must be cataloged
  • Generations of GDG should be sequential and must reside on disk or tape
  • For all new generation data sets, DISP parameter must be set to CATLG
  • For all new generation data sets, DSN and UNIT parameter must be coded



Advertisements






© copyright mainframebug.com
Privacy Policy