Ultimate answer for GDG (+1) vs GDG (+2) Generation in JCL

GDG stands for the generation data group. Always GDGs take care of your dataset with different generations. The best example is a telephone company operating its accounts, processing billing for its customers. There are files to generate all over the month for 30 days. So, by giving simple Technic GDG, you can capture data for 30 days in 30 different datasets.

GDG versions:

-2, -1, 0, +1, +2, +3, +4

In JCL, always (0) version states that the current version. If you want to create another generation, you need to give GDG(+1). Even, you use the same dataset as input, in downstream steps, you need to give as (+1). So, this states that it creates next to the current generation.

What to tell correct answer in Interviews, if GDG (+2) is given in JCL:

Suppose, you have given (+2) in JCL instead of (+1), then, it creates (+2) generation. So, it jumps the generation number to 2. Usually, it should be (+1). Since you have given as (+2), it creates (+2) generation after (0) generation.

Ex:

1st> GDG.G0002V00
next>GDG.G0004V00

Better say that, in interviews, if you give GDG (+2), job will run fine, without any errors.

Related Posts

Author: Srini

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

Comments are closed.