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

Receiving RC 5 when executing REXX program


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mpcollins

New User


Joined: 02 Nov 2022
Posts: 2
Location: United States

PostPosted: Wed Nov 02, 2022 9:27 pm
Reply with quote

I am an Endevor administrator. I have a processor that executes a COBOL compilation. If the program is DB2, it also runs a REXX that builds and submits a bind job. When running the REXX, which appears to execute correctly, I get a return code of 5. How can I determine which command is generating the RC of 5, besides adding a display of the RC after every line? Does using EXIT to end the program give it a return code of 5? Is there a way to set the RC myself to 0 when execution has been completed?
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 420
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Wed Nov 02, 2022 11:06 pm
Reply with quote

TRACE perhaps

www.ibm.com/docs/en/zos/2.1.0?topic=macros-using-clist-control-rexx-trace-statements
Back to top
View user's profile Send private message
mpcollins

New User


Joined: 02 Nov 2022
Posts: 2
Location: United States

PostPosted: Thu Nov 03, 2022 3:09 am
Reply with quote

I discovered the reason for the RC of 5. The program that I am using to call TSO will return a RC of 5 if no TSO statements are execxuted. Instead, REXX statements are execẗed. Thanks.
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


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

PostPosted: Thu Nov 03, 2022 9:39 am
Reply with quote

The following RC values and meanings are possible:
Values / Meaning
0 No error. The command, instruction, or nested command list completed successfully.
–1 The command, instruction, or nested command list encountered an error. The –1 return code passes control to the FAILURE label if you code SIGNAL ON FAILURE.
–3 The command or nested command list is not authorized for this operator or the REXX ADDRESS environment is not valid. The –3 return code passes control to the FAILURE label if you code SIGNAL ON FAILURE.
–5 The command list is canceled. The –5 return code passes control to the HALT label if you code SIGNAL ON HALT.

Others Other return codes are set by individual commands, instructions, or nested command lists.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Run rexx with JCL Job CLIST & REXX 3
No new posts Run rexx in batch job CLIST & REXX 7
No new posts Does anyone know rexx for VSE CLIST & REXX 3
No new posts Executing DB2 SQL store procedure via... DB2 0
No new posts TSO ALLOC In REXX Needs Improvement JCL & VSAM 3
Search our Forums:

Back to Top