GDG – Generation G0000V00 – Change V00 to V01

This is one of the typical interview questions in JCL GDG. Many times confusion is there about generation Vs Version.

When we give (+1) in JCL. Only a new GDG will be created, but the version is V00(do not change). My discussion is when the version will be changed. The below example shows 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 to more details in this IBM link.

Author: Srini

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