View previous topic :: View next topic
|
Author |
Message |
nupurbhui
New User
Joined: 25 May 2023 Posts: 22 Location: India
|
|
|
|
Hi,
I know that when we use COND parameter as COND=(0,NE) in a step, the condition will be checked against return code of all the previous steps executed.
But my requirement is to check the return code of only the previous step and run the current step if that has a MAXRC NE 0.
I am not able to use STENAME.RC, it throws INVALID REFERBACK ERROR.
Can any body help me out on this. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2156 Location: USA
|
|
|
|
nupurbhui wrote: |
Hi,
I know that when we use COND parameter as COND=(0,NE) in a step, the condition will be checked against return code of all the previous steps executed.
But my requirement is to check the return code of only the previous step and run the current step if that has a MAXRC NE 0.
I am not able to use STENAME.RC, it throws INVALID REFERBACK ERROR.
Can any body help me out on this. |
RTFM:
Code: |
// EXEC ...,COND=(0,NE[,stepname]) |
or
Code: |
// IF ([stepname.]RC EQ 0)
// . . . . . .
// ENDIF |
Please, move this topic to "Those Who Cannot Read" forum. |
|
Back to top |
|
|
nupurbhui
New User
Joined: 25 May 2023 Posts: 22 Location: India
|
|
|
|
I'm getting the below error for both the ways.
my code:
Code: |
//SFMSOFRB EXEC P2CUCPY,COND=(0,EQ[,SFMSOFRA]) |
error:
Code: |
58 IEFC620I UNIDENTIFIABLE CHARACTER [ ON THE EXEC STATEMENT
58 IEFC620I UNIDENTIFIABLE CHARACTER ] ON THE EXEC STATEMENT
|
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2156 Location: USA
|
|
|
|
nupurbhui wrote: |
I'm getting the below error for both the ways.
my code:
Code: |
//SFMSOFRB EXEC P2CUCPY,COND=(0,EQ[,SFMSOFRA]) |
error:
Code: |
58 IEFC620I UNIDENTIFIABLE CHARACTER [ ON THE EXEC STATEMENT
58 IEFC620I UNIDENTIFIABLE CHARACTER ] ON THE EXEC STATEMENT
|
|
OMG!!!!!
Moderators, please, move this user to an appropriate forum. |
|
Back to top |
|
|
nupurbhui
New User
Joined: 25 May 2023 Posts: 22 Location: India
|
|
|
|
I'm sorry, but where can I post this query? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2156 Location: USA
|
|
|
|
nupurbhui wrote: |
I'm sorry, but where can I post this query? |
First, I recommend to start from READING ANY MANUAL, rather than WRITING ANY CODE.
100% of programming manuals use the characters '[' and ']' to indicate OPTIONAL parts/keywords of the code. Since you don't know this, I'm pretty sure: you've never read any manual in your life...
Then, switch to the Beginners Forum - www.ibmmainframeforum.com/ |
|
Back to top |
|
|
nupurbhui
New User
Joined: 25 May 2023 Posts: 22 Location: India
|
|
|
|
I have created an account in the beginner's forum. It will take sometime to activate.
Meanwhile could you please suggest a few more ways I can test.
I am not able to use the stepname in the COND, both in the EXEC step or before it. It gives invalid referback error for the stepname.
And COND=(0,EQ) is not giving appropriate result. |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1348 Location: Bamberg, Germany
|
|
|
|
Read about COND again. It's NERTS (Any Are True, Skip), but you will get it how to code. See the previous hints, it's exactly what you asked for. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3077 Location: NYC,USA
|
|
Back to top |
|
|
|