Stuart:

Are you saying one should create a single trigger program like...

MASTER.TRIGGER.U
001 SUBROUTINE MASTER.TRIGGER.U (ExecStat, DictFlag, atFILENAME, atID,
atRECORD)
002 COMMON \trFILES\ TABLE.FV
003 IF FILEINFO(TABLE.FV, 0) = 0 THEN   ; ** UD version
004    OPEN '', 'TABLE' TO TABLE.FV ELSE
005       ExecStat = 0                  ; ** don't update file
006       RETURN
007    END
008 END
009 READ TriggerRec FROM TABLE.FV, 'TRIGGER.CONF' ELSE RETURN
010 TriggerFiles   = TriggerRec<1>
011 TriggerUpdates = TriggerRec<2>
012 TriggerDeletes = TriggerRec<3>
013 LOCATE(atFILENAME, TriggerFiles, 1; Pos) THEN
014    TriggerToRun = TriggerUpdates<1,Pos>
015    CALL @TriggerToRun
016 END

...that essentially reads a table...

TRIGGER.CONF
001 APVENDOR]ARCUSTOMER
002 U2.TRIGGER.SUB.U]U2.TRIGGER.SUB.U
003 U2.TRIGGER.SUB.D]U2.TRIGGER.SUB.D

...for the file and globally cataloged subroutine to run.   Then one
should...

>CREATE.TRIGGER APVENDOR MASTER.TRIGGER.U UPDATE
>CREATE.TRIGGER ARCUSTOMER MASTER.TRIGGER.U UPDATE
>CREATE.TRIGGER APVENDOR MASTER.TRIGGER.D DELETE
>CREATE.TRIGGER ARCUSTOMER MASTER.TRIGGER.D DELETE

Thanks,

Bill

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Boydell, Stuart
Sent: Thursday, October 09, 2008 11:56 PM
To: [email protected]
Subject: RE: [U2] Universe Triggers

Always ensure that any file opens in triggers resolve to specific paths
or accounts - that quick and dirty q-pointer from the 'wrong' account
will get you if you don't.

You can't debug through triggers (because they run in a transaction).

We also use a 'sub' trigger system but call @subroutines instead of
reading a table.

No performance issues.


>-----Original Message-----
>We are getting ready to implement triggers on a universe system running
>under Windows Server 2003.  I created a trigger and tested it out and
it
>appears to do exactly what we need.  My question is are there any
gotchas or
>issues we should be concerned about with triggers?  Are there any
>performance issues that anyone has seen related to triggers?

 
**********************************************************************
This email message and any files transmitted with it are confidential and
intended solely for the use of addressed recipient(s). If you have received
this communication in error, please reply to this e-mail to notify the
sender of its incorrect delivery and then delete it and your reply.  It is
your responsibility to check this email and any attachments for viruses and
defects before opening or sending them on. Spotless collects information
about you to provide and market our services. For information about use,
disclosure and access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
********************************************************************** 
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to