GDG – Generation G0000V00 – Change V00 to V01

This is one of the typical interview question in JCL GDG.

Many times confusion is there about generation Vs Version.

When we give (+1) in JCL. Only new GDG will be created,but version is V00(do not change).

My discussion is when version will be changed. The below example shows of it.

//JOB XXX
//STEP1 EXEC PGM=IEFBR14
//DD1  DD DSN=GDGROOT(+1),DISP=(NEW,CATLG)
//STEP2 EXEC PGM=IEFBR14
//DD2  DD DSN=GDGROOT.G0005V01,DISP=(NEW,CATLG)
//STEP3 EXEC PGM=IEFBR14
//DD3  DD DSN=GDGROOT(+1),DISP=OLD
//STEP4 EXEC PGM=IEFBR14
//DD4  DD DSN=GDGROOT(+2),DISP=OLD

The result of the first run will be:
  STEP1 ==> allocates GDGROOT.G0005V00
  STEP2 ==> allocates GDGROOT.G0005V01
  STEP3 ==> refers    GDGROOT.G0005V01
  STEP4 ==> refers    GDGROOT.G0006V00

Refer more details in this IBM link.

Advertisements

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.