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

Module 7: JCL GDG

GDG (Generation Data Groups)

  • GDG is one of the useful feature provided by MVS and as its name suggests it is used to catalog a group of datasets that have common and similar data format, and these datasets can be referenced by relative generation and version number.
  • The files(dataset) within GDG are called as generation or Generation Data Sets (GDSs)
  • GDG are mostly used to take periodic backups of critical data for future reference. For example payroll information, audit information, invoices of customers, account payable/receivable information.

Let’s understand with simple example:-

One HR job runs monthly and processes salary information of employees. In this case it is necessary to keep backup of these data. In such situation GDG can be used.

How GDG can be used- An overview

  • Make sure GDG Index is created. In our case let say GDG index ‘PAYROLL.SALARY.MONTHLY’ is already exist and job has already ran for month of February, March and April. Thus the current image of GDG will be visible to you through ISPF 3.4 option and will look like:-
  • However, while creating generation data set, we do no need to specify generation (last qualifier) as it is automatically assigned by operating system in incremental manner. Thus when job will run for May month it will automatically create dataset with name ‘PAYROLL.SALARY.MONTHLY.G0004V00
  • It is necessary here to understand that we do not have to modify our Job for each run and we just have to mention our GDG using below format
  • If we want to refer or use any generations in our JCL, we can use the whole name or relative generation number can be used as shown below
  • Without GDG, the backup functionality would have required change in JCL each time it runs. Also referring dataset would also have been a challenging task.

© copyright mainframebug.com
Privacy Policy