MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GDG Generation Question

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
sendeepr
Beginner


Joined: 26 Sep 2003
Posts: 4
Topics: 2

PostPosted: Fri Sep 26, 2003 6:24 am    Post subject: GDG Generation Question Reply with quote

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
View user's profile Send private message
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Fri Sep 26, 2003 6:53 am    Post subject: Reply with quote

Can you please elebotrate, Do you need clarification on GDG's or the abend in step3 ? generation numbers are system generated.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Fri Sep 26, 2003 8:08 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
bablack
Beginner


Joined: 04 Dec 2002
Posts: 71
Topics: 0
Location: Little Falls, NJ

PostPosted: Fri Sep 26, 2003 9:34 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Fri Sep 26, 2003 10:01 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
SureshKumar
Intermediate


Joined: 23 Jan 2003
Posts: 211
Topics: 21

PostPosted: Fri Sep 26, 2003 10:14 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12366
Topics: 75
Location: San Jose

PostPosted: Fri Sep 26, 2003 10:17 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
bablack
Beginner


Joined: 04 Dec 2002
Posts: 71
Topics: 0
Location: Little Falls, NJ

PostPosted: Fri Sep 26, 2003 10:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
taustin
Beginner


Joined: 24 Sep 2003
Posts: 1
Topics: 0
Location: Rochester, ny usa

PostPosted: Fri Oct 17, 2003 2:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group