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"

Variable value

Performs the defined Actions if the logical condition defined on the variable value returns True.

Rules:

Variable name: Local, Folder, or Global, as described in Variables. (Characters: 1-128, (z/OS 1-64)).

NOTE: (z/OS only) If you are using a Global variable you must include a \, such as \MYVAR.

Operator: The Operator determines the relationship between the variable and the value. There are two kinds of operator types, integer operator (numeric values) or string operator (string values). Depending on the operator type selected, you might need to provide one value, either number or string, or two values, such as a Min and Max range.

Rules value:

String:

  • 1-255 characters. The resolving string values can contain string lengths of up to 4000 characters.
  • (z/OS only) 1-64 characters. The resolving string values can contain string lengths of up to 80 characters.
  • Special characters: '*' ,(z/OS only '?')
  • String values can contain other variables.

Integer:

  • 1-255 characters for both the Min and Max value field combined if one of the fields contains a variable.
  • 1-10 characters for each Min and Max value field (11 characters if you are using number signs '+' or '-' ), if a variable is not used.
  • (z/OS only) 1-64 characters for each Min and Max value field if one of the fields contains a variable.
  • (z/OS only) 1-10 characters for each Min and Max value field (11 characters if you are using number signs '+' or '-') if a variable is not used.

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