In this document we are discussing workload triggers.
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.
- A 'file close' trigger only works for files that were opened for some form of write access.
- Use a full file directory name in the trigger file field and check for typos (it is case-sensitive).
- A trigger must be demanded or scheduled into the tracking file just like a job before it can be activated.
- Triggers can be purged from the tracking file with the DOS command:
"cautil cancel ttrigger ID=(triggername,DSCLOSEU) PURGE=YES"
or from the trigger status gui.
- Triggers can also be demanded using cautil statements or via the trigger gui:
"cautil demand trigger ID=(triggername,DSCLOSEU)"
Job triggers can be used in two ways:
- A static trigger has no calendar defined and is activated by autoscan . It fires multiple times and cannot be used as a predecessor as it will never be marked complete.
- A scheduled trigger's main characteristic is that it has a calendar defined. It is brought in by autoscan or can be demanded. It fires only once and can be used as a predecessor.
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.
caevent [event-name] [status-code]
Note: caevent operands are positional.
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.
"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:
- Define an event that executes a cautil demand JOB command. (That event is triggered by caevent trigname 4 for a user to pull this event's trigger.)
- Execute caevent trigname 4.
Troubleshooting triggers: Triggers go into WRSC status.
- Ensure the station name exists and matches the one defined in trigger.
Trigger type JOB INITIATION
What is the job name defined to?
Trigger type JOB TERMINATION
Trigger type CAEVENT
- Check the job name and fail codes defined in the trigger.
- Check the completion code of this job.
Trigger type FILE CLOSE (DSCLOSE)
- Check the CAEVENT command? Caevent eventname status code.
- Do the event name and status codes being used on the CAEVENT match the trigger?
The trigger has to be active in the tracking file (via demand or autoscan)
- Check the filename being used. Does the file being created match what is defined in the filename field?
- Is the STAT method being used?
- Is the file specified in the filename field existing on an NFS mounted filesystem?
- Is the filename defined with wildcards? If so, where in the filename is the wildcard?
- If the Calendar field is defined, the trigger will only trip once a day.