IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Return Code from Previous Step


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 23

PostPosted: Sat Jul 23, 2005 4:27 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
Search our Forums:

Back to Top