JOBRC Parameter Example


Scenario1 - Ignore JOBRC parameter.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (MTH123),'PAWAN Y',NOTIFY=&SYSUID

Explaining Example -

The job CLASS sets MAXRC as the complete code of the job.

Scenario2 - Set LASTRC as JOBRC.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP2 JOB (MTH123),'PAWAN Y',JOBRC=LASTRC,NOTIFY=&SYSUID

Explaining Example -

The last executed step return code sets as the completion code of the job.

Scenario3 - Set STEP01 return code as JOBRC.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP3 JOB (MTH123),'PAWAN Y',JOBRC=(STEP,STEP01),
//                      NOTIFY=&SYSUID 

Explaining Example -

Step STEP01 return code sets as the completion code (CC) of the job.

Scenario4 - Without JOBRC.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP4 JOB (MTH123),'PAWAN Y',NOTIFY=&SYSUID

Explaining Example -

Default method is applied to set the job return code.