Page 1 of 1

What GDG will be used?

Posted: Sat Feb 11, 2023 10:11 pm
by HajiAmida
A job has 5 steps and

1st step creates a new generation and is referred as +1

3rd step creates another generation and is referred as +2

5th step creates another generation and is referred as +3

If the job abends in 4th step and if it is decided that the job can be restarted from 4th step only then what generation to be mentioned in 5th step ?

Re: What GDG will be used?

Posted: Sat Feb 11, 2023 11:23 pm
by Robert Sample
The MVS JCL User's Guide manual answers this question:
Restarting a job with generation data sets
Certain rules apply when you refer to generation data sets in a job that is submitted for restart using the
RESTART parameter on the JOB statement.
For step restart
To refer to generation data sets that were created and cataloged in steps before the restart step, use their
present relative generation numbers. For example, if the last generation data set created and cataloged
was assigned a generation number of +2, it would be referred to as 0 in the restart step and in steps
following the restart step. In this case, the generation data set assigned number of +1 when created
would be referred to as -1.