JOBRC Parameter
JOBRC Parameter
Note! JOBRC parameter can be coded only at the job level.
JOBRC means the JOB Return Code. The JOBRC parameter is used to control how the job return code is set. It is a keyword parameter and optional.
Syntax -
JOBRC={MAXRC}
{LASTRC}
{(STEP,step-name[.proc-step-name]}
MAXRC | The job return code is set to the highest return code of any step or the abend code if the job fails. MAXRC is the default if not coded. |
LASTRC | The job return code is set from the last step return code. |
STEP,step-name[.proc-step-name] | The job return code is set from the proc-step-name. If the step does not exist, a JCL error occurs. |
Default and overrides -
If the parameter is not coded, the job CLASS sets MAXRC as a return code of the job.
Examples -
Scenario - Ignore JOBRC parameter.
//MTHEXMP1 JOB (MTH123),'PAWAN Y',NOTIFY=&SYSUID
The job CLASS sets MAXRC as the complete code of the job.