In this document we are discussing workload triggers.
Trigger types:
Identifies the type of trigger used as a predecessor:
CA Event Triggers an action when a Unicenter event occurs.
Job term Triggers an action when a specified job ends.
Job init Triggers an action when a specified job begins.
File close Triggers an action when a specified file is closed.
File unlink (UNIX) Triggers an action when a file is deleted.
IPL event (UNIX) Triggers an action when the system is booted.
Trigger Usage:
Job triggers can be used in two ways:
SQL Tables:
The mssql tables in database CAISCHDB for triggers are;
TRG - Trigger base record definition
TRT - Trigger tracking record definition.
Often events not related to a job need to be tied up to a job or jobset. For example a job can run only if a file containing data is available. In such case, a file close trigger is created and a job can be defined to with the aforesaid trigger as predecessor. (DSCLOSEU trigger).
Example: Workload server A runs a job on system A. Workload server B CANNOT RUN a job until a job submitted by server A completes.
Define a trigger on server B to watch for the completion (JOBTERMU message) of the job submitted by server A and define this trigger as a predecessor to the job on server B.
One can trigger a user defined logical event using a caevent trigger.
Use the caevent command to create a Workload Management event. Using cautil control statements or the GUI, you can define how the Workload Management facilities of Enterprise Management will react when the caevent command is executed. For example, with the DEFINE TRIGGER control statement (trigger type of caevent), you can identify a job to be released for processing when the caevent command generates an event with the same event name and status code as that specified by the defined trigger.
Syntax:
caevent [event-name] [status-code]
Note: caevent operands are positional.
Warnings:
If the caevent command you supply is syntactically or semantically incorrect, or the status code you specify is out of range, a diagnostic message is issued and the created event is ignored.
Example:
"caevent trigname 4" directs the Workload Manager to search the trigger definitions for the name trigname. The trigger type for trigname must be caevent. The Workload Management monitor will process the action associated with trigname and the status code is 4.
In the event a job must be started after a particular event occurs (such as a particular user completing a task), the caevent command will trigger the next job to begin after the event occurs.
Using caevent, the user can trigger any event. For example:
Troubleshooting triggers: Triggers go into WRSC status.
Trigger type JOB INITIATION
What is the job name defined to?
Trigger type JOB TERMINATION