Actions
Actions are additional types of tasks that Control-M automatically performs before, during, or after a job executes.
You can define one or more of the following actions in the Actions tab of the job definitions:
-
Events: Adds or deletes an event An conditional entity that creates a sequential relationship between jobs by enabling the successor job to execute after the predecessor job has executed. based on the run date, as described in Events.
-
Notifications before Job Completion: Sends a notification to a destination or predefined list of destinations before a job executes, as described in Notifications before Job Completion Attributes.
-
If-Actions: Performs an action that you define when a certain if condition that you define is met, as described in If-Actions.
-
Notifications after Job Completion: Sends a notification to a destination or list of destinations that you define after a job executes, as described in Notifications after Job Completion Attributes.
-
Capture from Job Output: Captures data from the job output A tab in the job properties pane of the Monitoring domain where the job output appears that indicates whether a job ended OK, and is used, for example, with jobs that check file location. and saves it to a local, global, named pool, or SMART folder variable, based on the attributes that you define. This action can take place in the script during job execution, or in the job post-processing actions, as described in Capture from Job Output Attributes.
-
Output Handling: Copies, moves, or prints the job output to another location when the job completes execution with a status of Ended OK, as described in Output Handling.
Notifications before Job Completion Attributes
Notifications before Job Completion actions are user-defined messages that Control-M sends to one or more destinations at a user-defined time before a SMART folder or job executes.
The following table describes the Notifications before Job Completion panel attributes.
Attribute |
Description |
---|---|
Job Not Submitted by <Time> |
Sends a message when the job is not or cannot be not submitted by the time you define. For cyclic folders and jobs, this attribute only controls the first execution. To define notifications for subsequent executions, see the Job's Calculated Cyclic Submission Is Late By option. |
Job's Execution Time |
Sends a message when the elapsed execution time exceeds the number of minutes you define. Time limits are expressed as the actual elapsed minutes of a job execution, or as a deviation from the (statistical) average execution time. Rules: 1–999 minutes. |
Job Not Finished by <Time> |
Sends a message when the job continues executing after the defined time. |
Job Set to Rerun |
Sends a message when the job is set to rerun, (not valid for folders). |
Job's Calculated Cyclic Submission Is Late By |
Sends a message when the beginning of the second or subsequent cyclic execution is late by the number of minutes you define. You must select and define the Job Not Submitted by <Time> attribute to send a notification when the first cyclic execution is late. This feature is supported in Control-M/Server 9.0.21 and higher. A cyclic job is set to run at 11:00, 12:00, and 13:00. You want to receive a notification if one of its cyclic job submissions runs late by five minutes or longer, so you define two Notifications Before Job Completion actions, as follows:
Rules: 1–999 minutes. |
Destination |
Determines where the notification is sent, as follows:
|
Message |
Defines the text of the notification message as follows: Rules: Characters: 1–255; z/OS: 1–70 Case Sensitive: Yes Invalid Characters: None |
Urgency |
Determines one of the following levels of message urgency:
|
Notify Attributes
The following table describes the attributes for a Notify If-Action.
Attribute |
Description |
---|---|
Destination |
Determines the destination of the notification, as follows:
|
Message |
Defines the text of the notification message. Rules:
|
Urgency |
Determines one of the following levels of message urgency:
|
Mail Attributes
The following table describes the mail attributes when the Destination option is set to Mail.
Attribute |
Description |
---|---|
To |
Defines an email address for recipients of the mail message. Rules:
|
CC |
(Optional) Defines a carbon copy (CC) email address. On some UNIX computers, the CC field is not supported, and all recipients must go in the To field. Rules:
|
Subject |
Defines the subject line for the message. Rules:
|
Attach Output |
Determines whether the output is sent as an email attachment, as follows:
|
If-Actions
If-Actions enable you to define when a certain action is performed when an if-condition that you define is met, as described in If Attributes for If-Actions and Action Attributes for If-Actions.
-
If you select Job's Number of Reruns to Equal To 3, and select the Set to OK action, after the job has rerun three times, the job is set to Ended OK.
-
If you select Output Cannot Be Found and select the Notifyaction, the Alerts window is notified that an output was not found.
-
If you select Job Ended and select the Handle Output action, the output is sent to another destination, such as copying it to another file path, when the job has ended.
-
If you select Job's Number of Executions to Greater Than 3, and select the Rerun Job action, the job is rerun when the number of job executions is greater than 3.
If Attributes for If-Actions
The following table describes the If attributes in the If-Actions panel.
Options |
Description |
---|---|
Job Ended Not OK |
Performs the defined Action if the job ends with the status Ended Not OK. |
Job Ended |
Performs the defined Action if the job ends. |
Job Ended OK |
Performs the defined Action if the job ends with the status Ended OK. |
OS Completion Status |
Performs the defined Action in response to the exit code that the operating system returns. |
Job's Number of Executions |
Performs the defined Action when the defined number of job executions for the life of the job is met. |
Job's Number of Reruns |
Performs the defined Action when the defined number of job reruns for this job instance (Run ID) is met. |
Output Cannot Be Found |
Performs the defined Action if the output cannot be found. |
Job Has Not Been Submitted Yet |
Performs the defined Action if the job returns as not submitted. |
Job's Number of Failures |
Performs the defined Action in relation to the number of times the job failed. |
Specific Statement Output |
Performs the defined Action if one of the following is fulfilled:
Rules:
Statement and code character strings can contain the following wildcard characters:
The following are statement and code combinations:
|
Variable Value |
Performs the defined Actions if the logical condition defined on the variable value returns True. This feature is supported on Control-M/Server 9.0.21 and higher. Rules:
Dummy jobs do not support this If-Action attribute. |
Any Programs Step |
(z/OS) Performs the defined Action if the specified codes are found in any program step. Rules:
|
Every Program Step |
(z/OS) Indicates that the value is used without being accompanied by limiting step values when the code criteria are satisfied for every step. The code criteria are satisfied for every step in the job without exception. Rules:
|
Specific Step Name |
(z/OS) Defines the name of a specific procedure or program step. If a specific procedure or program step is specified, only program or procedure steps from the invoked procedure or program are checked to see if they satisfy the code criteria. Program or procedure steps directly from the job are not checked. Rules:
|
Specific Range Name |
(z/OS) Specifies a range of steps in the steps of an Any program step statement. Rules:
|
JOBRC |
(z/OS) Assign a completion code for the entire job based on the completion codes of its steps. |
Output Pattern |
(z/OS) Performs the defined Action if the specified pattern is found in the output.
|
Action Attributes for If-Actions
The following table describes the Action attributes in the If-Actions panel.
Option |
Description |
---|---|
Sends a notification to a specific destination, as described in Notify Attributes. |
|
Set to OK |
Sets the status of a job to OK, even if the job completes Not OK. |
Set to Not OK |
Sets the status of a job to Not OK, even if the job completes OK. |
Rerun Job |
Re-executes the job. |
Stop Cyclic Run |
Stops subsequent iterations of the current cyclic job. |
Set Variable |
Resolves the value of a user-defined variable A type of variable whose name and value you manually define in a job and can reference in the same job and subsequent jobs. for use in subsequent jobs, with attributes, as described in Variables. |
Run Job and Ignore Scheduling Criteria |
Forces a job to execute, even if the scheduling criteria is not met. You can also select to Run as Independent Flow, which determines whether the job workflow in the folder executes independently from other instances of the same workflow using the same events. This is achieved by adding a unique suffix to the events used in each workflow instance. Run as Independent Flow is supported in SMART folders, sub-folders, and jobs.
|
Handle Output |
Determines how the job handles the output, as follows:
z/OS:
|
Add/Delete Event |
Determines whether to add or delete a prerequisite The part of the job definition that controls the flow of your jobs, such as an event that controls flow sequence or a resource that controls load balancing. event, as described in Events. |
Control-M Analyzer Rule |
(z/OS) Defines the Control‑M/Analyzer rule that Control-M executes. Name:
Argument:
|
Set Restart Options |
(z/OS) Determines the job steps to execute during restart of a job: Parameters:
|
Notifications after Job Completion Attributes
Notifications after Job Completion actions are user-defined messages that Control-M sends to one or more destinations at a user-defined time after a SMART folder or job executes.
The following table describes the Notifications after Job Completion panel attributes.
Option |
Description |
---|---|
Job Ended Not OK |
Sends the message if the job finished executing with an unsuccessful operating system completion status, or due to a submission failure, such as the queue does not exist. |
Job Ended OK |
Sends the message if the job finished executing with a successful operating system completion status. |
Destination |
Determines where the notification is sent, as follows:
|
Message |
Defines the text of the notification message as follows: Rules: Characters: 1–255; z/OS: 1–70 Case Sensitive: Yes Invalid Characters: None |
Urgency |
Determines one of the following levels of message urgency:
|
Capture from Job Output Attributes
Captures data from the job output A tab in the job properties pane of the Monitoring domain where the job output appears that indicates whether a job ended OK, and is used, for example, with jobs that check file location. and saves it to a local, global, named pool, or SMART folder variable, based on the attributes that you define.
The following table describes the Capture from Job Output attributes.
Attribute |
Description |
---|---|
Name |
Defines the variable name that contains the captured data, that can be used in other jobs. |
Type |
Determines the variable type as described in User-Defined Variables. |
Cursor Position |
Determines where in the output file to run the capture process as follows:
|
Data to Capture |
Determines the specific data to capture as follows:
|
Output Handling
The Output Handling action copies, deletes, moves, or prints the job output A tab in the job properties pane of the Monitoring domain where the job output appears that indicates whether a job ended OK, and is used, for example, with jobs that check file location. to another location when the job completes execution with a status of Ended OK.
The following table describes the Output Handling action attributes.
Attribute |
Description |
---|---|
Action |
Default: None z/OS:
Default: None |
Filename |
Defines the filename and its position in the directory (pathname) of the file that contains the job ouput when the job ends OK. |
New Destination |
Defines the pathname that the job output is sent to when the job ends OK. |
Printer Name |
Determines the printer that prints the job output when the job ends OK. |