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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: If STEP1 RC is 16, then we have to execute STEP2
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

Moderator Team Head


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

PostPosted: Mon Sep 29, 2008 3:29 pm    Post subject: Reply to: JCL - Condition Code
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    Post subject: Re: JCL - Condition Code
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: 1703
Location: Australia

PostPosted: Mon Sep 29, 2008 4:47 pm    Post subject:
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    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 Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts execute APP if they are not ADDRESS T... italo_pm CLIST & REXX 3 Fri Aug 12, 2016 2:15 am
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm
No new posts CEXEC not able to execute if no SLINE... boyti ko CLIST & REXX 2 Wed Apr 13, 2016 4:31 pm
No new posts CALL MACRO EXECUTE FORM - Setting the... sudarshan.srivathsav PL/I & Assembler 7 Tue Feb 09, 2016 10:32 pm


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