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!

Setting return code variable of JCL 1

Status
Not open for further replies.

Anks

Programmer
Apr 17, 2002
5
0
0
US

In cobol we can set system variable RETURN-CODE which in turn populates that value in LASTCC/MAXCC variable in JCL and in turn decides the execution of the steps of JCL.

Similarly RC is the variable in the rexx for setting the return codes. Can we set the LASTCC/MAXCC variables from rexx ??

I am running my rexx through batch job using utility IKJEFT01. If any error in rexx it sets the RC variable to non-zero value but the step in the JCL still runs fine with return code equals to zero. All i want is set the condition code of step calling rexx in JCL to non-aero value in case of any rexx failure.

Can someone help in this regard ??

Anks
 
IKJEFT01 always ends with 0. IKJEFT1A and ~1B will let you set the return code.
 
I do this...

zispfrc = exit_code
"VPUT (ZISPFRC)"
EXIT

... and the batch job step ends with whatever number exit_code has been assigned.

Cheers,
Dave.
 
Hello,
please use IKJEFT1A or IKJEFT1B and not IKJEFT01 to execute your REXX-Script.

then you can set the RETURN-CODE for your JCL simple with

/* REXX */
.
. some instructions here
.
.
EXIT [your RETURN-CODE]

cu
kai
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top