Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
proc step return code to override in proc itself

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: proc step return code to override in proc itself
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

Senior Member


Joined: 21 Sep 2010
Posts: 2299
Location: NY,USA

PostPosted: Tue Aug 20, 2019 5:22 pm    Post subject:
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

Active Member


Joined: 29 Apr 2008
Posts: 609
Location: Maryland

PostPosted: Tue Aug 20, 2019 5:34 pm    Post subject: Re: proc step return code to override in proc itself
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: 8499
Location: Dubuque, Iowa, USA

PostPosted: Tue Aug 20, 2019 6:34 pm    Post subject: Reply to: proc step return code to override in proc itself
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts COBOL -DB2 SQL code to have GROUP BY ... vinu78 DB2 21 Wed Oct 23, 2019 7:00 pm
No new posts Difference between GE and GB return c... Poha Eater IMS DB/DC 8 Fri Jul 12, 2019 12:59 pm
No new posts Having problem passing a variable to ... markzasz JCL & VSAM 12 Thu Jul 11, 2019 5:31 pm
No new posts S0C4 Reason Code 10 cz016m COBOL Programming 1 Thu May 02, 2019 7:13 am
No new posts Any single step solution possible? Rohit Umarjikar SYNCSORT 7 Mon Apr 22, 2019 6:18 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us