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: 755
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 Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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