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
 

 

Problem in executing a step based on return code

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

New User


Joined: 12 Apr 2008
Posts: 36
Location: NOIDA

PostPosted: Wed Feb 17, 2010 5:01 pm    Post subject: Problem in executing a step based on return code
Reply with quote

Hi , I have a step in JCL which is executing based on if condition

IF ((S2.RC NE 6 AND S6.RC NE 7 AND S2.RC NE 1) AND S7.RC EQ 2) THEN
S8 EXEC PGM=IKJEFT01
*
SYSTSPRT DD SYSOUT=*
SYSTSIN DD DSN=&&PRTCRD,DISP=(SHR,PASS)
DELETE DD DSN=&CKA61.test,DISP=(OLD,DELETE,DELETE)
ENDIF

Now mine requirement is like , before this step there is step S6.
When S6 is getting flushed out then this step is not executing because of AND condition S6.RC NE 7 .So I changed it to OR condition.
IF ((S2.RC NE 6 OR S6.RC NE 7 AND S2.RC NE 1) AND S7.RC EQ 2)

I do not want to run this step when S6 return code is 7 then this step should not execute.which is not executing when
IF ((S2.RC NE 6 AND S6.RC NE 7 AND S2.RC NE 1) AND S7.RC EQ 2)



So I want to give a condition when S6 gets flushed out then this step should execute and When return code of S6 is 7 then this step should not
execute.

Thanks
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: Wed Feb 17, 2010 5:09 pm    Post subject:
Reply with quote

I suggest that you hit the "IBM Manuals" button at the top of any page and then read the chapter on IF/THEN/ELSE/ENDIF processing.

What you want can indeed be accomplished using these, you just need to read some more and then try again.
Suggest you pay some attention to the RUN parameter.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 743
Location: Germany

PostPosted: Thu Feb 18, 2010 2:15 pm    Post subject:
Reply with quote

And as i told someone else before:

Please read about the IF Statement in JCL.
So you don't need thesse unreadable COND anymore.
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 How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Viewing executing process in NDM .. q... Debb.Brant IBM Tools 0 Wed Dec 14, 2016 10:55 pm


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