HP Integrity NonStop H-Series User Manual
Page 85

Triggers
HP AutoSYNC User’s Guide—522580-021
6-5
TRIGGER examples
2. Change the system name \sys1 to \sys2 in a synchronized edit file nodename:
3. Accelerate the synchronized object files in subvolume $data.tstobj:
4. Compare the old destination file with the new destination file: discrepancies will be
reported to the log file:
5. Conditionally SQL compile objects depending on the file code of the object file.
Only objects that can run on the destination are SQL compiled. The SYNC trigger
invokes a TACL macro TRIGCOND as follows:
SYNC trigtest.nodename TO \sys2.$data.trigtest.*, LISTALL,
TRIGGER "edit /in trigin.updatsys/#SYNCFILE",LOGFILE synctest.log;
Where trigin.updatsys is:
cab/sys1/sys2/a;la
SYNC $data.object.* TO \tst.$data.tstobj.*, TRIGGER
“AXCEL #SYNCFILE, #SYNCFILE”;
SYNC /home/dev/sales/appl TO /E/paris/home/sales/appl/, LISTALL, LOGFILE
triglog, CLEAR, TRIGGER "/home/sales/scripts/cpsyrcv #SYNCFILE
#RECOVERFILE ";
cpsyrcv:
cp $1 /home/sales/bckupnew/;
cp $2 /home/sales/bckupold/;
SYNC $data.test.sqobj TO \paris.$datab.testb.sqobj,
TRIGGER "RUN TRIGCOND #SYNCFILE";