Previous Topic

Next Topic

Book Contents

Book Index

General Information for DO OK

A DO OK statement can change the status of a job step from NOTOK to OK. If all steps of a job have a status of OK the job is assigned a final termination status of ENDED OK.

When specified in a SMART Table Entity, a DO OK statement changes the termination status of the SMART Table (not the status of jobs or job steps).

The relationship between job step status and the final termination status of the job is as follows:

Control-M determines the status of each individual step in a job before determining the final status of the job.

After examining the results of a job step, Control-M automatically assigns a status of OK or NOTOK to the step:

In general, if any of the steps in a job ends with a status of NOTOK, the job is assigned a final status of ENDED NOTOK. For a job to be assigned a final status of ENDED OK, each step in the job must be assigned a status of OK.

This logic suits most situations. Do not change it. However, there may be a situation in which Control-M assigned a step a status of NOTOK, but the status ought to be changed to OK. Several such exceptional situations are described below:

DO OK cannot be specified for the same ON step and code event as DO NOTOK and DO RERUN.

A DO OK statement specified in the job scheduling definitions is ignored if one of the following occurs:

For more information, see CODES Values.

Since the DO OK action is inherently associated with a job step and not the job as a whole, its interaction with the reserved step name ANYSTEP is as follows:

The return code of each step of the job is examined to determine whether it satisfies the codes specified in the CODES parameter. If the CODES are satisfied, that step is 'explained' and that particular step is given a status of OK. Any job step whose return code does not satisfy the CODES is 'unexplained' and will cause a SEL216W message to be issued and the corresponding job step to be marked as NOTOK. The job's final status is then determined as described above.

Parent Topic

DO OK: Post–Processing Parameter