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
 
Tricky COND code checking. Can it be done?

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

New User


Joined: 03 Jul 2006
Posts: 53

PostPosted: Fri Oct 30, 2009 8:57 pm    Post subject: Tricky COND code checking. Can it be done?
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: 1777
Location: Bloomington, IL

PostPosted: Fri Oct 30, 2009 9:06 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Fri Oct 30, 2009 9:09 pm    Post subject: Reply to: Tricky COND code checking. Can it be done?
Reply with quote

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

Site Director


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

PostPosted: Fri Oct 30, 2009 9:12 pm    Post subject:
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    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 Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
This topic is locked: you cannot edit posts or make replies. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts I want to retire TRX and use only Rex... Abhinav Sharma CLIST & REXX 6 Sat Jul 29, 2017 2:53 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm

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