Setting error codes using the job completion checker

Sometimes the success or failure of a job or started-task operation cannot be determined from step completion codes alone. For example, a job might fail because a certain data set is not available, but this particular failure might be acceptable for this operation. That is, you would not want the operation representing the job to be marked as ended-in-error. However, if the job fails because it ran out of processor time, this failure might not be acceptable. In this case, you would want the operation representing the job to be marked as ended-in error. The job completion checker (JCC) function can be used to distinguish between operation failures of this type.

Just as you might look at the SYSOUT output of a job to find out whether a program issued a certain message, the JCC can do this automatically for you. The JCC scans the SYSOUT data set of a job or started task and set an error code for the operation, depending on the results of the scan.

The JCC can set an error code for the operation. But the step completion or abend code is still available and can be used in RECOVER statements; the JCC sets only the job error code.

The JCC is a tracker function, therefore is independent of the contents of the current plan. The JCC processes all jobs and started tasks for which a termination event (type 3P) was created in the event data set, regardless of whether the jobs or started tasks are defined in the current plan.

Note: Define acceptable nonzero return codes either by using the operation's HIGHRC job option or by defining statements on the NOERROR initialization statement. Do not use the JCC to reset nonzero return codes that you consider acceptable. For more information about the job completion checker see Customization and Tuning.