Page 1 of 1

How to refer to GDG when restarting a Job ?

PostPosted: Wed Dec 15, 2010 4:37 pm
by Srikk
Hi,

I have a scenario where there are three steps in a job.
Step1 Creates GDG with (+1) i.e. a new one.
Step2 Does nothig related to GDG.
Step3 Creates GDG with (+2)

DISP=(NEW,CATLG,DELETE) for steps 1,3

Step1 executed successfully. The job fails at Step2.
If i have to restart at Step2, can I create Generation (+2)?

My Answer was: No, since step1 went fine the latest generation was created and now is (0).

Please let me know what is correct. I don't have access to mainframe, so couldn't try it out myself.

Re: How to refer to GDG when restarting a Job ?

PostPosted: Wed Dec 15, 2010 11:29 pm
by Bill Dennis
You can use +2 as the relative GDG indicator when you create the next file. There will be a gap in numbering. If the current generation is G0001V00, you will create G0003V00. No harm.

The concern is trying to refer to the +1 file in a later step on a restart. That's when you need to change the JCL to (0) to recall it.

Re: How to refer to GDG when restarting a Job ?

PostPosted: Thu Dec 16, 2010 12:12 am
by NicC
It is best, if possible, to create your GDGs not as GDGs but as temporary datasets and then copy (or rename, but copy is better) the temp datasets to GDGs at the end of job, or in another job immediately following the creation job.

Re: How to refer to GDG when restarting a Job ?

PostPosted: Thu Dec 16, 2010 10:01 am
by Srikk
Thank you guys. :)