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

Capture the RC of previous step


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
nupurbhui

New User


Joined: 25 May 2023
Posts: 22
Location: India

PostPosted: Mon Jan 06, 2025 4:43 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2156
Location: USA

PostPosted: Mon Jan 06, 2025 6:03 pm
Reply with quote

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
View user's profile Send private message
nupurbhui

New User


Joined: 25 May 2023
Posts: 22
Location: India

PostPosted: Mon Jan 06, 2025 6:22 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2156
Location: USA

PostPosted: Mon Jan 06, 2025 6:37 pm
Reply with quote

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
View user's profile Send private message
nupurbhui

New User


Joined: 25 May 2023
Posts: 22
Location: India

PostPosted: Mon Jan 06, 2025 6:42 pm
Reply with quote

I'm sorry, but where can I post this query?
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2156
Location: USA

PostPosted: Mon Jan 06, 2025 6:47 pm
Reply with quote

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... icon_axe.gif

Then, switch to the Beginners Forum - www.ibmmainframeforum.com/
Back to top
View user's profile Send private message
nupurbhui

New User


Joined: 25 May 2023
Posts: 22
Location: India

PostPosted: Mon Jan 06, 2025 7:23 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1348
Location: Bamberg, Germany

PostPosted: Mon Jan 06, 2025 9:50 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3077
Location: NYC,USA

PostPosted: Fri Jan 10, 2025 8:15 am
Reply with quote

Moved to beginner’s section of this forum.
E.g
ibmmainframes.com/about14151.html
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 -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts Mark Previous & next lines when a... DFSORT/ICETOOL 9
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 convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Rexx to capture output from TSO HSEND... CLIST & REXX 9
Search our Forums:

Back to Top