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

proc step return code to override in proc itself


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Aaryaa

New User


Joined: 20 Aug 2019
Posts: 1
Location: INDIA

PostPosted: Tue Aug 20, 2019 4:32 pm
Reply with quote

Hi, one of the step in my proc is completing with return code 4. This proc is called in one job. The job has last step as -

// IF RC > 1 THEN
//PROC99 EXEC abend routine
// ENDIF

And because of which my job is finally abending.

Any idea how to override the return code of that step in the proc itself. So that I do not need to modify the job at all.

I tried giving -
IF STEP010.RC=04 THEN
SET LASTCC=01
ENDIF

but that did not help. I tried MAXCC / LASTCC / STEP.RC but none of that worked.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


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

PostPosted: Tue Aug 20, 2019 5:22 pm
Reply with quote

And how are you planning to deploy proc in production ? Either one needs to be changed and the correct place is JCL. You don’t need that IF conditions at all and update the max rc in scheduling to 4 for this job and you are done.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Tue Aug 20, 2019 5:34 pm
Reply with quote

Aaryaa wrote:
I tried giving -
IF STEP010.RC=04 THEN
SET LASTCC=01
ENDIF

but that did not help. I tried MAXCC / LASTCC / STEP.RC but none of that worked.

With this level of understanding of JCL concepts you are welcome to the Beginners Forum!

The quoted code is (highly likely?) a mixture of keywords used in JCL, and completely different keywords used inside of system utility IDCAMS; both given with syntax errors. Is seems to be impossible at the Expert Forum to have no idea about the difference between them.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Aug 20, 2019 6:34 pm
Reply with quote

Quote:
Any idea how to override the return code of that step in the proc itself. So that I do not need to modify the job at all.
This cannot be done -- step condition codes are set by the program executing in the step, and once set they cannot be changed. Your BEST solution would be to change the job to
Code:
IF RC > 4 THEN
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 purge jobs with return code 0 and ret... JCL & VSAM 4
No new posts Starting a PROC with parameters from ... CLIST & REXX 6
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
Search our Forums:

Back to Top