Events

Events (previously conditions) are dependencies between jobs or SMART folders on a shared Control-M/Server. Events enable successor jobs or SMART folders (entities) to begin execution once their predecessor entities finish execution. This happens when these entities have fulfilled all other defined prerequisitesClosed 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.. An event is a type of prerequisite, along with scheduling criteria and resource requirements, that a job or SMART folder must fulfill before it can execute.

The following image shows a number of events, which appear as lines and arrowheads between predecessor and successor jobs:

Finance_Australia, Finance_UK, and Finance_USA jobs begin execution once Finance_Beginning_of_Month successfully completes execution—provided that the successor jobs have fulfilled their other prerequisites. Finance_End_of_Month begins execution once all three of its predecessor jobs successfully complete execution, and once it has fulfilled all other prerequisites.

The Events tool in the Tools domain enables you to add or delete events, monitor active events in your workflow, and search for specific event information, such as the date of an event.

You add an event in the following situations:

  • Your database goes down. You add an event that prevents job execution until the database is back up.

  • An event that a successor job is dependent on is not added automatically. You manually add an event to for a job to begin execution when a predecessor job completes execution.

The following video describes Control-M events:

Global Events

Global events are dependencies between jobs or SMART folders on different Control-M/Servers.

The following image shows the SMART folder Bill_Monthly, on Control-M/Server dba-tlv-w8glq3, connected by a global event to Pay_Monthly, a SMART folder successor on Control-M/Server dba-tlv-w8ompr:

Pay_Monthly begins execution when it fulfills all of its prerequisites, including the successful execution of predecessor SMART folder Bill_Monthly.

All global events must be defined with global event prefixes, which enable you determine the Control-M/Servers where each global event operates. To create a global event prefix, see Global Conditions Prefixes.

Creating an Event

This procedure describes how to create an event as a dependency between two jobs, which enables the successor job to execute after its predecessor completes execution.

Begin

  1. Hover your cursor over the predecessor job.

    An arrowhead appears below the job.

  2. Click and drag the arrowhead to the successor job.

    The event line appears between the two jobs. Event attributes appear in the Prerequisites tab in the right pane, as described in Event Attributes. You can view information about the event by clicking the arrowhead, as shown below:

Pasting Jobs with Events

This procedure describes how to paste jobs with events, which eliminates the need to redefine the events connected with the jobs that were copied.

Begin

  1. Right-click on the jobs that you intend to copy, and select Copy.

    The jobs and their events are copied.

  2. In the same SMART folder or in a different SMART folder, right-click and select Paste with Events.

    The copied jobs and events are pasted to this location.

Wait for Event Attributes

The following table describes the Wait for Event attributes that a successor job must wait for before it can execute.

Attribute

Description

Name

Defines the name of the event.

Rules:

  • Characters: 1–255, (z/OS): 1–39.

  • Case Sensitive: Yes

  • Invalid Characters: Blank spaces, ', (, ), and |.

The default event format is [Source Job Attribute: Job Name]-TO-[Target Job Attribute: Job Name].

You can redefine this format in one of the following ways:

Run Date

Defines the date attribute associated with the event, as follows:

  • Run Date: Waits for an event that has the current run date as the date.

  • Any Date: Waits for an event with any date.

  • No Date: Waits for an event with no date.

  • Previous Run Date: Waits for the event where the date is the previous run date of the successor job.

    If you manually run this job, and you have selected Ignore scheduling criteria, the event that the job waits for has a run date of yesterday.

    Job B waits for an event with a date of the previous run date added by Job A. If Job A is scheduled to run on Monday and Wednesday, and Job B is scheduled to run on Saturday, when Job B runs on Saturday, it is waiting for the event that was added by Job A on Wednesday.

  • Next Run Date: Waits for the event where the date is the next run date of the successor job.

    If you manually run this job, and you have selected Ignore scheduling criteria, the event that the job waits for has a run date of tomorrow.

  • Specific Date: Waits for a specific event date.

  • Offset: Specify a + or - followed by a number from 0 through 999, indicating the number of days in the future (+), or in the past (-), relative to the actual run date.

Delete

Determines whether the event is deleted after the successor job completed execution.

Relationship

Determines the relationship between events where the successor is waiting for more than one event, as follows:

  • AND Between All : Waits for all the events before the job executes.

  • OR Between All : Waits for one of the events before the job executes.

  • Manually Set : Enables you to set the event relationship criteria manually, as follows:

    • -: Indicates no special relationship between the current and following event.

    • (: Begins a parenthetical with successive events.

    • ): Ends a parenthetical with previous events.

    • Parentheses cannot be nested.

Default: AND Between All.

AND/OR

Defines the relationship between the previous event and the successive event.

Event Attributes

The following table describes the event attributes added to a predecessor job after execution, which enables the successor job to execute.

Attribute

Description

Name

Defines the name of the event.

Rules:

  • Characters: 1–255, (z/OS): 1–39.

  • Case Sensitive: Yes

  • Invalid Characters: Blank spaces, ', (, ), and |.

The default event format is [Source Job Attribute: Job Name]-TO-[Target Job Attribute: Job Name].

You can redefine this format in one of the following ways:

Run Date

Defines the date when the event is added or deleted as follows:

  • Run Date: Defines the date of the event as the run date of the job.

  • Any Date: (Delete Only) Deletes all events with the specified event name.

  • No Date: Adds or deletes the event without defining the date.

  • Previous Run Date: Defines the date of the event where the date is the previous run date of the successor job.

    If you manually run this job, the date that the event is added or deleted is yesterday (ODATEClosed The date that a job joins the Run Queue.-1).

  • Next Run Date: Defines the date of the event as the next run date of the job.

    If you manually run this job, the date that the event is added or deleted is tomorrow (ODATE+1).

  • Specific Date: Defines a specific date of the event.

  • Offset: Specify a + or - followed by a number from 0 through 999, to indicate the number of days in the future (+), or in the past (-),

    relative to the actual run date.

Add/Delete

Determines whether the event is added or deleted from the job after it finishes executing.

Default: Add