On Actions parameters

The following table describes the On Actions parameters when adding On/Do Actions in Job Properties.

Parameter

Description

Job ended not OK

Determines whether the accompanying DO statements are performed if the job ended not OK.

Job ended

Determines whether the accompanying DO statements are performed if the job ended.

Job ended OK

Determines whether the accompanying DO statements are performed if the job ended OK.

OS completion status

Determines whether the accompanying DO statements are performed if the OS completion status is met.

  • =, <, >, !, Even, Odd
  • Completion code

Job's number of executions

Determines whether the accompanying DO statements are performed if the job's number of executions is met.

  • =, <, >, !, Even, Odd
  • Number of executions

Job's number of reruns

Determines whether the accompanying DO statements are performed if the job's number of reruns due to DO RERUN, is met. For more information, see Rerun Job.

  • =, <, >, !, Even, Odd
  • Number of reruns

Output cannot be found

Determines whether the accompanying DO statements are performed if the Output cannot be found. This can occur in the following cases:

  • The output cannot be found as results of a communication issue.
  • The output cannot be found since the job is in disappeared status.

Job has not been submitted yet

Determines whether the accompanying DO statements are performed if the job is submitted to the Control-M/Agent to run, but returns as not submitted.

Job's number of failures

Determines whether the accompanying DO statements are performed if the job's number of failures is satisfied.

Specific statement output

The On parameters for a specific statement output requires the following:

  • Statement: An asterisk must be specified in this field.

    The statement set is compared to the On statements defined for the job. If the Code parameter is specified as the * mask character, it can match even a null error message record successfully.

    If there is a match between the On statements and a statement set from the job’s log, the corresponding Do action statements are executed. Otherwise, Control‑M proceeds to the next statement set.

  • Code: Defines the exit code of DOS .bat scripts and REXX .cmd scripts that are returned to Control-M/Server, as described in Utilization of exit codes.

    On Statement/Code combinations related to completion codes, for example:
    ON "*" "COMPSTAT>0"

    On Statement/Code combinations related to Output, for example:
    ON "*cp aaa bbb*" "*not found*"

    On Statement/Code combinations based on the OK/NOTOK state of the job, for example:
    ON "*" "NOTOK"

Any program step

(z/OS only) Indicates that the Do Statements must be performed if the specified codes are found in any program step.

However, if Any program step is specified with the codes Job Ended OK, Job Ended Not OK, Any type of execution error, Job out put was lost, Job was canceled during executing, Job failed due to security requirements, Job not submitted, or Unknown error occurred, the On criteria is satisfied only if the entire job ends with the specified code criteria.

If Any program step is specified with the ORDER code, no other codes can be specified in the same On block, and the Procedure field must be left blank.

Every program step

(z/OS only) Indicates that the Do Statements must be performed if the specified codes are found in any program step.

However, if Any program step is specified with the codes Job Ended OK, Job Ended Not OK, Any type of execution error, Job out put was lost, Job was canceled during executing, Job failed due to security requirements, Job not submitted, or Unknown error occurred, the On criteria is satisfied only if the entire job ends with the specified code criteria.

If Any program step is specified with the ORDER code, no other codes can be specified in the same On block, and the Procedure field must be left blank.

Specific Step Name

(z/OS only) Name of a specific procedure/program step. If a specific procedure/program step is specified, only program/procedure steps from the invoked procedure/program are checked to see if they satisfy the code criteria. Program/procedure steps directly from the job are not checked.

JOBRC

(z/OS only) Assigns a completion code for the entire job based on the completion codes of its steps.

Output pattern

(z/OS only) Indicates that the Do statements must be performed if the specified pattern is found in the output.

Specific Range Name

(z/OS only) Specifies a range of steps in the steps of an PGMST statement.

Parent Topic

On/Do Actions