Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Step execution of a JCL by checking the RC from another job

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

New User


Joined: 24 Dec 2007
Posts: 10
Location: India

PostPosted: Fri Nov 20, 2009 11:02 am    Post subject: Step execution of a JCL by checking the RC from another job
Reply with quote

Hi,
I have a tricky situation. Here is my JCL.

Code:
//UID9999A JOB (ACCOUNTINFO),'C02030IN',                         
//             CLASS=A,                                         
//             REGION=0M,                                       
//             MSGCLASS=T,                                       
//             TIME=                                             
/*JOBPARM R=HS1C,S=F081                                         
//*                                                             
//JS001   EXEC PGM=IEBGENER                                     
//SYSPRINT DD  SYSOUT=$                                         
//SYSOUT   DD  SYSOUT=$                                         
//SYSIN    DD  DUMMY                                             
//SYSUT1   DD  DSN=AAA.BBB.CCCCCCCC.JCLLIB(C02030BP),DISP=SHR   
//SYSUT2   DD  SYSOUT=(E,INTRDR)                                 
//*                                                             
//JS002   EXEC PGM=IEBGENER,COND=(0,LT)                         
//SYSPRINT DD  SYSOUT=$                                         
//SYSOUT   DD  SYSOUT=$                                         
//SYSIN    DD  DUMMY                                             
//SYSUT1   DD  DSN=AAA.BBB.CCCCCCCC.UTILLIB(C02030RC),DISP=SHR   
//SYSUT2   DD  SYSOUT=(E,INTRDR)                     
//*                                                   
//JS204IN EXEC PGM=IEBGENER                           
//SYSPRINT DD  SYSOUT=$                               
//SYSOUT   DD  SYSOUT=$                               
//SYSIN    DD  DUMMY                                 
//SYSUT1   DD  DSN=AAA.BBB.CCCCCCCC.UTILLIB(C02040IN),
//             DISP=SHR                               
//SYSUT2   DD  SYSOUT=(E,INTRDR)                     


Evey step in the JCL is submitting a JCL. The last step JS204IN is submitting a JCL which starts a chain reaction to submit another set of JCLs.

My question is can I start JS204IN step by checking condition code from job C02030RC submitted in previous step JS002 ? The JOB names of all JCLs are same. So they are running in sequence.

I cant combine all JCLs as I have 100s JCLs like this and they need to run in sequence as they are updating the database.

How do I solve this, any idea ? Pls help.

Thanks
Bidhu
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: Fri Nov 20, 2009 11:42 am    Post subject:
Reply with quote

I would guess not because step JS204IN will begin executing after job C02030RC has been submitted but probably before it has completed. In other words, job C02030RC will probably still be running when step JS204IN is ready to do its test, and I don't think there's a way for a step to test the RC of another job anyway. Besides, this type of conditional executing should normally be handled by your scheduling software.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Nov 20, 2009 11:51 am    Post subject:
Reply with quote

Hi,

if all the jobnames are the same, then the jobs are not goning to run in parallel, then why not add a step to each job to submit the next job.

ie. on completion of member C02030BP submit C02030RC, on completion of C02030RC submit C02040IN, on completion C02040IN submit C02030BP.

How do you stop the loop ?

Gerry
Back to top
View user's profile Send private message
bidhucsc

New User


Joined: 24 Dec 2007
Posts: 10
Location: India

PostPosted: Fri Nov 20, 2009 12:19 pm    Post subject:
Reply with quote

Thanks for your replies.

Terry, BP will complete 1st before RC as they have the same names and they are running in sequence.

Gerry,
There is no loop. This JCL (C02030IN) has the sequence of JCLs to run. If you see the last step has C02040IN and in C02030IN we have C02050IN and so on. But these IN JCL may have different steps in them. These IN JCLs are already present in the system and I am trying to combine them based on some request.

Since I am combining these JCLs (putting next JCLs at the end step) using REXX, it will be difficult for me to determine which is running after what. Since there are 100s of JCLs, the REXX will take forever to run.

Is there a way to run the JS204IN step, based on the return code from C02030RC JCL ? I could not find it in IBM manuals.

Any help in this regard will be appreciated.

Thanks
Bidhu
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Nov 20, 2009 12:26 pm    Post subject:
Reply with quote

Not easily. They are two seperate addresss spaces and as such can not communicate to each other.

Of course, this is a perfect example of what a scheduler package should be used for.
Back to top
View user's profile Send private message
bidhucsc

New User


Joined: 24 Dec 2007
Posts: 10
Location: India

PostPosted: Fri Nov 20, 2009 12:40 pm    Post subject:
Reply with quote

Using a scheduler is a good option but these jobs are one time set up jobs that we give to our customers when we give the packages.

Slightly close to what Gerry suggested, I am thinking of putting C02040IN at the end of C02030RC. This should work, I hope.

Thanks all for your responses.
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 Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts Checking Current date vickey_dw DFSORT/ICETOOL 1 Wed Feb 08, 2017 11:14 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Reasonable way of checking wildcards ... sergeyken CLIST & REXX 5 Wed Sep 07, 2016 8:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us