View previous topic :: View next topic |
Author |
Message |
sendeepr Beginner
Joined: 26 Sep 2003 Posts: 4 Topics: 2
|
Posted: Fri Sep 26, 2003 6:24 am Post subject: GDG Generation Question |
|
|
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. |
|
Back to top |
|
|
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Fri Sep 26, 2003 6:53 am Post subject: |
|
|
Can you please elebotrate, Do you need clarification on GDG's or the abend in step3 ? generation numbers are system generated. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Sep 26, 2003 8:08 am Post subject: |
|
|
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. |
|
Back to top |
|
|
bablack Beginner
Joined: 04 Dec 2002 Posts: 71 Topics: 0 Location: Little Falls, NJ
|
Posted: Fri Sep 26, 2003 9:34 am Post subject: |
|
|
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. _________________ Bruce A. Black
Senior Software Developer
Innovation Data Processing |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Sep 26, 2003 10:01 am Post subject: |
|
|
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 |
|
Back to top |
|
|
SureshKumar Intermediate
Joined: 23 Jan 2003 Posts: 211 Topics: 21
|
Posted: Fri Sep 26, 2003 10:14 am Post subject: |
|
|
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 |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12372 Topics: 75 Location: San Jose
|
Posted: Fri Sep 26, 2003 10:17 am Post subject: |
|
|
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 |
|
Back to top |
|
|
bablack Beginner
Joined: 04 Dec 2002 Posts: 71 Topics: 0 Location: Little Falls, NJ
|
Posted: Fri Sep 26, 2003 10:18 am Post subject: |
|
|
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). _________________ Bruce A. Black
Senior Software Developer
Innovation Data Processing |
|
Back to top |
|
|
taustin Beginner
Joined: 24 Sep 2003 Posts: 1 Topics: 0 Location: Rochester, ny usa
|
Posted: Fri Oct 17, 2003 2:46 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
|
|