How to refer to GDG when restarting a Job ?



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

How to refer to GDG when restarting a Job ?

Postby Srikk » Wed Dec 15, 2010 4:37 pm

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.
Srikk
 
Posts: 3
Joined: Wed Dec 15, 2010 3:47 pm
Has thanked: 0 time
Been thanked: 0 time

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

 

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

Postby Bill Dennis » Wed Dec 15, 2010 11:29 pm

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.
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

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

Postby NicC » Thu Dec 16, 2010 12:12 am

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

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

Postby Srikk » Thu Dec 16, 2010 10:01 am

Thank you guys. :)
Srikk
 
Posts: 3
Joined: Wed Dec 15, 2010 3:47 pm
Has thanked: 0 time
Been thanked: 0 time


Return to JCL