Previous Topic

Next Topic

Book Contents

Book Index

On/Do Actions

Automatic interventions, such as rerunning a job or ordering a remedial job, if a job ends with a particular error code.

Control-M processes On/Do Actions combinations in the following order:

  1. On/Do Action combinations related to completion codes, for example:

    ON "*" "COMPSTAT>0"

  2. On Statement/Code combinations related to Output, for example:

    ON "*cp aaa bbb*" "*not found*"

  3. On Statement/Code combinations based on the Job ended OK/not Ok state of the job, for example:

    ON "*" "NOTOK"

    On Parameters

    Parameter

    Description

    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.

    Job ended not OK

    Determines whether the accompanying DO statements are performed if the job ended not 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.

    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"

Do Actions

Parameter

Description

Set Variable

The Set Variable assigns a value to a variable for use in a rerun of the job when the On Statement/Code criteria are satisfied.

Add/Remove Condition

The Add/Remove Condition parameter specifies a prerequisite condition to be added or deleted when the On Statement/Code criteria are satisfied.

Order Job

The Order Job parameter forces an individual job or all jobs in a folder to be placed in the Active Jobs file (regardless of each job’s Scheduling criteria) when the On Statement/Code criteria are satisfied.

Notify

The Notify parameter specifies a notification to be sent a specific destination when the specified On Statement/Code criteria are satisfied.

End Job Not Ok

Assigns a completion status of NOTOK to a job when the On Statement/Code criteria are satisfied, regardless of the job’s actual completion status.

Set to Ok

Assigns the completion status of OK to a job, regardless of its actual completion status.

Remedy

Opens a ticket in the Remedy Help Desk.

Rerun Job

Indicates if an automatic rerun should be performed when the On Statement/Code criteria are satisfied.

Control-M Analyzer Rule

Invokes a Control‑M/Analyzer rule to be executed.

Mail

A mail message that is sent to the indicated e-mail addresses when the condition specified by the On Statement/Code parameter is satisfied.

Set Restart Options

Job steps to be executed during restart of a job.

Stop Cyclic Run

When specified, this parameter prevents subsequent iterations of the current cyclic job.

Handle Output

Indicates how the job’s output should be handled when the On Statement and Code criteria are satisfied.

Parent Topic

Actions parameters