Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Refer the current generation in a subsequent step

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
abhay pratap singh

New User


Joined: 22 Nov 2007
Posts: 77
Location: noida

PostPosted: Sat Feb 21, 2009 5:39 pm    Post subject: Refer the current generation in a subsequent step
Reply with quote

Suppose a generation of GDG gets created in a particular step of a proc. How should I refer the current generation in a subsequent step?
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8201
Location: Dubuque, Iowa, USA

PostPosted: Sat Feb 21, 2009 5:51 pm    Post subject:
Reply with quote

(+0) always refers to the current generation. However, if you want to refer to the generation you just created, you must use (+1) to get to it throughout the job; once the job is complete the +1 generation will become the +0 generation.
Back to top
View user's profile Send private message
Debabrata Pruseth

New User


Joined: 11 Dec 2008
Posts: 59
Location: Pune , India

PostPosted: Sun Feb 22, 2009 1:48 am    Post subject:
Reply with quote

Hi Abhay

One thing more to be kept in mind while coding the PRC is to take care of the RESTART instructions in the subsequent steps.

For example , if STEP10 creates a GDG generation ( i.e +1 ) and STEP20 uses this current GDG generation ( i.e +1) then while executing the program if the STEP20 abends and you go for restaring STEP20 then the GDG generation being picked up in the new run will depend on the type of scheduler .

Some scheduler remember the last GDG used in the STEP and hence will use the one last referred in the abended step ( in this case same as the one created in STEP10 ) , however other will try to read +1 generation of the base which will not be there and will cause the job to abend.

So you need to check with the RESTART instruction carefully depending on the scheduler being used.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Sun Feb 22, 2009 4:06 am    Post subject:
Reply with quote

As Debarata mentioned, schedulers will usually handle correctly the generations needed when restarting. If you restart without the aid of a scheduler, one common method is to assign symbolic variables to the generations, e.g., GEN1='(+1)', GEN2='(+2)', GEN3='(+3)', etc. When restarting you can change the gens referenced in your JCL by simply changing GEN1 to '(0)', GEN2 to '(+1)', GEN3 to '(+2)', etc. without changing the body of the JCL. You won't always be subtracting just 1 from the initial number, but you should get the drift. Each gen will be decremented by the same amount in this fashion.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Fetching data from JHS as per the cur... arunsoods All Other Mainframe Topics 4 Wed Nov 22, 2017 1:54 pm
No new posts Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us