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
 
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: 757
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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
No new posts How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts it is possible output a SET value fro... Martylin JCL & VSAM 5 Fri Sep 22, 2017 7:08 am

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