Actions to be performed after job execution generally depend on the results of the job execution:
The Control-M monitor tracks each job execution. Following the termination of a job, the Control-M monitor checks the execution results of each step in the job. Based on the results, the Control-M monitor determines a final status of the job. Either of two final job statuses can be assigned:
Table 159 Final Job Statuses
Status |
Description |
---|---|
OK |
Job ended OK. This status is usually assigned when all steps in the job end with a condition code less than or equal to MAXCCOK. |
NOTOK |
Job ended NOTOK. This status is usually assigned when any step ends with a condition code greater than or equal to MAXCCOK. It is also assigned if the job abends or is not run. The following statuses are subsets of end status NOTOK:
|
Control-M assigns an end status to jobs based on the following criteria:
If a post-processing error occurs after a job ends OK (including FORCE OK), it indicates that there is a problem with the post-processing statements defined in the job scheduling definition. For example, a post-processing statement may have indicated an action that the owner of the job was not authorized to perform.
Post-processing parameters can be divided into the following groups:
Parameters Performed When the Job Ends OK
Table 160 Parameters Performed When the Job Ends OK
Parameter |
Description |
---|---|
OUT |
Adds or deletes prerequisite conditions. |
§Restart§ AUTO-ARCHIVE |
Archives sysout. |
RETENTION |
Specifies retention criteria of a job in the History Jobs file. |
SYSOUT |
Specifies sysout processing. |
Conditional Processing or Processing in All Situations
Most conditional processing is specified through a combination of ON and DO statements. ON and DO statement definition consists of defining ON statement step and code events (for example, ON PGMST STEP1 CODE C0016), followed by DO statement actions (for example, DO SHOUT, DO FORCEJOB), which are performed when the ON step and code criteria are satisfied.
A range of steps for use in the ON statement can be defined in the STEP RANGE parameter.
ON and DO statements also specify actions that are to be performed in any and all cases. To ensure that the ON statement is activated for all step and code events, enter reserved word ANYSTEP as the ON step name and ***** as the ON code.
Table 161 Conditional Processing Statements
DO Statement |
Description |
---|---|
DO statements allow specification of a wide variety of actions to be performed when the ON criteria are satisfied: |
|
DO COND |
Add or delete prerequisite conditions. |
DO CTBRULE |
Activate a Control-M/Analyzer rule. |
DO FORCEJOB |
Force a job. |
§Restart§ DO IFRERUN |
Perform Control-M/Restart job restart. |
DO MAIL |
Send an e-mail to the specified recipients. |
DO NOTOK |
Set the status of the step to NOTOK. |
DO OK |
Set the status of the step to OK. |
DO REMEDY |
Open a Remedy Helpdesk ticket. |
DO RERUN |
Rerun the job. |
DO SET |
Set the value of an AutoEdit variable. |
DO SHOUT |
Send a message. |
DO STOPCYCL |
Stop recycling a cyclic task. |
DO SYSOUT |
Handle sysout processing. |
The following parameter specifies the condition that determines if and when processing is performed. |
|
SHOUT |
Sends a message to a specified destination in specified situations (for example, if the job was submitted late). |
Rerun and Cyclic Post-processing Parameters
Table 162 Rerun and Cyclic Post-Processing Parameters
Parameter |
Description |
---|---|
MAXRERUN |
Maximum number of times to rerun the job (used only for automatic job rerun or cyclic jobs). (Called RERUN – MAXRERUN prior to version 6.0.00). |
RERUNMEM |
Member containing the JCL to be used for automatic rerun. (Called RERUN – RERUNMEM prior to version 6.0.00.) |
END-TABLE |
Whether the job is an end point for the SMART table (Y/N). |
CAPTURE BY |
Data to extract from the job's JES output datasets (JESYSMSG, JESJCL, and JESMSGLG) and place into a Control-M AutoEdit variable. |
INTERVAL |
Minimum time interval between runs of a rerun or cyclic job. This parameter acts as a Runtime Scheduling parameter for the subsequent rerun or cyclic runs of the job. |
Parent Topic |