GDG Generation

GDG GENERATION

A generation is an individual dataset that belongs to a Generation Data Group (GDG).

Each time you create a new version of the same kind of data (for example, a daily report or a backup file) it becomes a new generation within the GDG

Generations are automatically named by the system with a generation number and a version number at the end like: MYDATA.BACKUP.REPORT.G0001V00, MYDATA.BACKUP.REPORT.G0002V00

All generations share the same GDG base name (MYDATA.BACKUP.REPORT in this example) but have different unique suffixes (GxxxxVxx)

If you run a backup job every night, each night's backup will be stored as a new generation under the same GDG base

EXAMPLE

//CRTEGEN   JOB (12345),CLASS=A,MSGCLASS=X,NOTIFY=&SYSUID
//STEP1     EXEC PGM=IEFBR14
//MYGDG     DD   DSN=MYDATA.BACKUP.REPORT(+1),
//               DISP=(NEW,CATLG,DELETE),
//               SPACE=(CYL,(1,1),RLSE),
//               UNIT=SYSDA,
//               DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS)

Explanation:

  • JOB Statement: Starts the job named CRTEGEN.

  • EXEC Statement: Runs the IEFBR14 utility to create a dataset without doing any processing.

  • DD Statement:

    • DSN=MYDATA.BACKUP. REPORT(+1): Creates a new generation under the GDG base(MYDATA.BACKUP.REPORT). (+1) means "next generation" or "new generation"

    • DISP=(NEW,CATLG,DELETE): Creates and catalogs the dataset if successful, deletes it if the job fails.

    • SPACE=(CYL,(1,1),RLSE): Allocates 1 cylinder initially and 1 cylinder as secondary.

    • UNIT=SYSDA: Allocates on the default system storage device.

    • DCB=(RECFM=FB,LRECL=80,BLKSIZE=800,DSORG=PS): Defines the dataset attributes: Fixed Block format, 80-byte record length, and it’s a sequential dataset.

Last updated

Was this helpful?