IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Tricky COND code checking. Can it be done?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rmd3003

New User


Joined: 03 Jul 2006
Posts: 55

PostPosted: Fri Oct 30, 2009 8:57 pm
Reply with quote

Hello there. I have a slight problem with properly defining COND code checking in my JCL. Can somebody tell me if it's possible at all.

There are 4 steps in JCL. First step executes program which will generate codes 1 thru 7. Depending on code I have to execute steps 2, 3 and 4 in order below:
Code:
RC FROM STEP1      EXECUTE STEPS
----------------------------------------
     1             STEP2               
     2             STEP3               
     3             STEP4               
     4             STEP2 + STEP3       
     5             STEP2 + STEP4       
     6             STEP3 + STEP4       
     7             STEP2 + STEP3 + STEP4


JCL looks like this:
Code:
//*=== FIRST STEP WILL ISSUE RC 1 THRU 7
//*                                     
//STEP1   EXEC PGM=TRIGGER1             
//*                                     
//STEP2   EXEC PGM=PROGR1,COND=???     
//*                                     
//STEP3   EXEC PGM=PROGR2,COND=???     
//*                                     
//STEP4   EXEC PGM=PROGR3,COND=???     
//*                                     


Is it possible at all?

Thanks.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Fri Oct 30, 2009 9:06 pm
Reply with quote

Why do you wish to use COND instead of IF/THEN/ELSE?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Oct 30, 2009 9:09 pm
Reply with quote

I concur.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Oct 30, 2009 9:12 pm
Reply with quote

Hello,

Can step1 issue a zero return code?

If not, you could use something like:
Code:
//STEP2 EXEC PROGR1,COND=(2,EQ),(3,EQ),(6,EQ))


If the trigger cound issue a zero, add (0,EQ) to the list.

Code the other 2 steps accordingly.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top