Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

return codes 2

Status
Not open for further replies.

Lohman

IS-IT--Management
Oct 2, 2003
6
US
How do I pass a non-zero return code from a COBOL program to the JCL job step that executes it. Or in other words force a job step that executes a COBOL program to end with a specific condition code.
 
Thanks. The link was very helpful.
 
Thanks, Claudeb. This is a very helpful site, and I've bookmarked it for future use.

Nina Too
 
Hi Lo,

You can do this:

MOVE 8 TO RETURN-CODE

before exiting your pgm. That 8 or whatever you choose becomes the CC for the step that execed your pgm. It can be tested using the JCL COND or IF/THEN/ELSE clauses in subsequent steps.

RETURN-CODE must not be coded in WS; it's called a special register and is treated as a reserved word in COBOL.

Regards, Jack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top