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
 

 

Return Code from Previous Step

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

New User


Joined: 23 Jul 2005
Posts: 1

PostPosted: Sat Jul 23, 2005 12:02 pm    Post subject: Return Code from Previous Step
Reply with quote

Hi,
I have many steps in my PROC. I have my conditions as follows:

STEP010 <Exec Statement>, COND=(0,NE)

STEP020 <Exec Statement>

STEP030 <Exec Statement>, COND=(1,NE,STEP010)

STEP040 <Exec Statement>, COND=(1,LT,STEP010)

STEP050 <Exec Statement>

STEP060 <Exec Statement>, COND=(0,NE,STEP040)

My query is,
I m getting a return code of 4 from STEP010. Will the step 20 get executed?
STEP040 got flushed due to the condition given but the step 60 got executed with a return code of 0 which i dont want.

What will be the return code of the step when that particular step is FLUSHED?
Back to top
View user's profile Send private message

jayesh_g

New User


Joined: 03 Mar 2004
Posts: 24

PostPosted: Sat Jul 23, 2005 4:27 pm    Post subject: Re: Return Code from Previous Step
Reply with quote

Quote:
Will the step 20 get executed?
Yes.
Quote:
step 60 got executed with a return code of 0 which i dont want
Change COND appropriately.
Quote:
What will be the return code of the step when that particular step is FLUSHED?
There is no return code.
Back to top
View user's profile Send private message
KAUSHIK RANGARAJAN

New User


Joined: 19 Jul 2005
Posts: 22
Location: chennai

PostPosted: Mon Jul 25, 2005 9:43 am    Post subject: Return Code from Previous Step
Reply with quote

Hi Geetha,

Regarding your first question " I m getting a return code of 4 from STEP010. Will the step 20 get executed?" , Remember you normally use condition when there are multiple steps and when the execution of a particular step depends on the return code of the previous step. So it is wise to code the condition parameter on second step onwards.

If you code it in the first step, since there are no previous steps the first step will be always executed. In this case the second step will be executed surely.

---------------------------------------------------------------------------------

Regarding your second question " STEP040 got flushed due to the condition given but the step 60 got executed with a return code of 0 which i dont want " , I think you should change the condition code either at step40 or at step60. By FLUSHED do you mean an error or is it bypassed?. If it is an error, step 60 wont run, since return code of step 40 will be greater than 0.


I think the rerurn code when a step gets flushed is 0. In this case step 60 executes as the condition is not satisfied [ ie 0 NE 0 ].

Hope this helps,
Correct me if I am wrong,

Bye, icon_rolleyes.gif icon_rolleyes.gif
Back to top
View user's profile Send private message
cheli

New User


Joined: 21 Jul 2005
Posts: 11

PostPosted: Mon Jul 25, 2005 12:16 pm    Post subject: Re: Return Code from Previous Step
Reply with quote

HI KAUSHIK ,

If any step got flushed,the return code is not zero,That means even if you specify the condition parameter COND=(0,LE,STEP040) for STEP060 it will execute always.
So the bottom line is,If you refer the RC of flushed step for any condition parameter,the corresponding step will get execute always.

Thanks.
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
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 PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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