6 triggers, Overview, Trigger commands – HP NonStop G-Series User Manual
Page 75: Triggers

HP AutoSYNC User’s Guide—522580-015
6-1
6
Triggers
This section gives a basic overview of AutoSYNC triggers. Triggers allow a user to run
a TACL or OSS shell command for each synchronized file that was successfully moved
to the destination system (TRIGGER) or after a complete file set has been successfully
synchronized (TRIGGERONFILESET).
Overview
The TACL command specified as a trigger may invoke a TACL macro, obey a script, or
execute a program. An OSS shell command may invoke a script, or execute an OSS
program.
The tasks performed by a trigger can be as simple as altering file attributes or as
complex as language or SQL compilation.
If the trigger is executed for every file that is synchronized, AutoSYNC continues with
the synchronization of the next file after the command has completed.
If the trigger is for a file set, it is executed after the synchronization has completed,
even if a file error occurred during the synchronization. If an error other than a file error
occurred and caused the synchronization to fail, the trigger is not executed.
Note that lengthy trigger operations can delay synchronization of a AutoSYNC file set
by the amount of time needed to complete the commands.
The feature is invoked by specifying TRIGGER or TRIGGERONFILESET option in the
Trigger Commands
Specify a complete TACL or OSS command line that includes built-in arguments that
are replaced by appropriate file names. The maximum length of the command-text is
128 bytes.
The command line can contain built-in arguments. Each argument starts with a pound
sign (#) and is terminated by a TACL delimiter character such as space, comma (,),
and so on. Arguments can be specified in either upper case or in lower case.
SYNCHRONIZE … TRIGGER “command-text”;
or
SYNCHRONIZE … TRIGGERONFILESET “command-text”;
ADD SYNCFILESET … TRIGGER “command-text”;
or
ADD SYNCFILESET … TRIGGERONFILESET “command-text”;