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

If STEP1 RC is 16, then we have to execute STEP2


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

New User


Joined: 08 Jun 2006
Posts: 45
Location: Trumbull, CT

PostPosted: Mon Sep 29, 2008 3:22 pm
Reply with quote

Hi,
Anyone please help me to resolve this.

I have three STEPS in my JCL.
If the STEP1 RC is 0, then the STEP2 and STEP3 should be bypassed.
If the STEP1 RC is 16, then we have to execute STEP2 and STEP3.

I have used the following COND in my STEP2.
STEP2 EXEC DPBOPSSD,COND=(0,GT)
(if the return code from STEP1 is 0, the system bypasses STEP2. If the return code is greater than 0, the system executes STEP2.) But the JCL is working fine for RC 0, but when I get RC 16, Its not executing STEP2. Can anyone please suggest what condition code I have to use in STEP2 and in STEP3?

Note - I have tried almost all the options to solve my request. But still I am not getting the expected result.
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Mon Sep 29, 2008 3:29 pm
Reply with quote

// IF (STEP1.RC = 16) THEN
//STEP2 EXEC DPBOPSSD
//*
//STEP3 EXEC ...
// ENDIF
Back to top
View user's profile Send private message
hchinnam

New User


Joined: 18 Oct 2006
Posts: 73

PostPosted: Mon Sep 29, 2008 3:52 pm
Reply with quote

kaleelahamed wrote:
Hi,

If the STEP1 RC is 0, then the STEP2 and STEP3 should be bypassed.
If the STEP1 REC is 16, then we have to execute STEP2 and STEP3.



What about the other return codes?

assuming you have to bypass the step when RC is zero and execute it when RC is other then zero (that includes 16 anyway) your cond can be COND=(0,EQ).

Quote:

have used the following COND in my STEP2.
STEP2 EXEC DPBOPSSD,COND=(0,GT)
(if the return code from STEP1 is 0, the system bypasses STEP2. If the return code is greater than 0, the system executes STEP2.) But the JCL is working fine for RC 0


ZERO GT 16 is false. So when your STEP1 RC is 16, this step will execute when your RC is 16.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Mon Sep 29, 2008 4:47 pm
Reply with quote

Hi,

if you are not going to use the IF statement as suggested by Kevin, you can code the following :-
Code:
COND=(16,NE,STEP1)




Gerry
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 Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Fetch data from programs execute (dat... DB2 3
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Evaluate variable to execute a jcl step JCL & VSAM 3
No new posts Execute REXX on logon with ISPF CLIST & REXX 3
Search our Forums:

Back to Top