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?
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 ].
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.