GDG Generation Question
Select messages from
# through # FAQ
[/[Print]\]

MVSFORUMS.com -> Job Control Language(JCL)

#1: GDG Generation Question Author: sendeepr PostPosted: Fri Sep 26, 2003 6:24 am
    —
hi

pls clarify me on this.....

i have 5 steps in a job, the step 1 creates a new generation, step2 refers it.....
while job is submitted the job abends at step3......

what should i do so that the generation numbers should be created as & when the job completes.

#2:  Author: SureshKumar PostPosted: Fri Sep 26, 2003 6:53 am
    —
Can you please elebotrate, Do you need clarification on GDG's or the abend in step3 ? generation numbers are system generated.

#3:  Author: kolusuLocation: San Jose PostPosted: Fri Sep 26, 2003 8:08 am
    —
sendeepr,

If the step3 abends, the new GDG generations are already catalogued and if step3 is referring them it should now refer the GDG(0).

Hope this helps...

cheers

kolusu

PS: Please do not post topics with subject titles.

#4:  Author: bablackLocation: Little Falls, NJ PostPosted: Fri Sep 26, 2003 9:34 am
    —
Quote:
If the step3 abends, the new GDG generations are already catalogued and if step3 is referring them it should now refer the GDG(0).

Not true. The rule is that a GDG generation is refered to by the same relative generation number throughout the life of a job. So if you create gdg(+1), you must refer to it as +1 in any followiong steps that need it.

Only after the job ends will you refer to it as gdg(0) in subsequent jobs.

This is a frequent source of confusion.

#5:  Author: kolusuLocation: San Jose PostPosted: Fri Sep 26, 2003 10:01 am
    —
Bablack,

Run this sample JCL. This job has 3 steps.

Step010 is allocation of the GDG generation using IEFBR14.
Step020 is copying the pre-allocated gdg in step010 which is empty.
Step030 is sorting the GDG on fields which does not exist. so step3 abends.

Code:

//STEP010  EXEC PGM=IEFBR14                                     
//FILE01   DD DSN=MYTID.GDG.TEST(+1),                         
//            DISP=(NEW,CATLG,DELETE),                         
//            UNIT=SYSDA,                                       
//            SPACE=(TRK,(1,1),RLSE),                           
//            DCB=(LRECL=80,RECFM=FB,BLKSIZE=0)                 
//*                                                             
//STEP020  EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=MYTID.GDG.TEST(+1),DISP=SHR                 
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                                 
 SORT FIELDS=COPY                                               
//*                                                             
//STEP030  EXEC PGM=SORT                                       
//SYSOUT   DD SYSOUT=*                                         
//SORTIN   DD DSN=MYTID.GDG.TEST(+1),DISP=SHR                 
//SORTOUT  DD SYSOUT=*                                         
//SYSIN    DD *                                                 
 SORT FIELDS=(81,8,CH,A)                                       
//*                                                             


After the abend go to 3.4 dslist and you will find new generation existing. A job abend is essentially treated as job end for the gdg's and the new generation catalogued.


Now if you restart in step3 correcting the sort card, your job will have JCL ERROR.It is due to 'MYTID.GDG.TEST', RELATIVE GENERATION '+1' DOES NOT EXIST.

If you start the job from TOP by correcting the sort card in step030, you will now have 2 generations after the completion of the JOb. One gen from the previous abend Job and another from the new run.

Let me know if this is wrong.

Thanks

Kolusu

#6:  Author: SureshKumar PostPosted: Fri Sep 26, 2003 10:14 am
    —
How about CA-7, if the job is re-started thru the scheduler, its my understanding that he would understand the relative generation and proceed and will not give a '+1' does not exist. Thanks

#7:  Author: kolusuLocation: San Jose PostPosted: Fri Sep 26, 2003 10:17 am
    —
Suresh Kumar,

It does not matter if it CA-7 restart or a regular restart, the job will abend with the JCL error

Kolusu


Last edited by kolusu on Fri Sep 26, 2003 10:18 am; edited 1 time in total

#8:  Author: bablackLocation: Little Falls, NJ PostPosted: Fri Sep 26, 2003 10:18 am
    —
You are correct. Restarting the job in step 3 to correct the abend is essentially a new job so you must change the JCL to refer to gdg(0) instead of gdg(+1).

I interpreted your earlier reply to mean that you needed to refer to it as gdg(0) in the same job execution once you got past the step that cataloged it (step010 in your example). The generation is cataloged in that step, and any other jobs that refer to it must use gdg(0) after it ends, but in the same job you must continue to refer to it as gdg(+1).

#9:  Author: taustinLocation: Rochester, ny usa PostPosted: Fri Oct 17, 2003 2:46 pm
    —
I know this is an old post but we use CA-11(old name UCC11) at our shop. Using CA-11 to control the restart allows us to restart a job WITHOUT changing the JCL. On a GDG one only has to be careful that the generations are not changed beween the original run and the restart.



MVSFORUMS.com -> Job Control Language(JCL)


output generated using printer-friendly topic mod. All times are GMT - 5 Hours

Page 1 of 1

Powered by phpBB © 2001, 2005 phpBB Group