Hi Bill
That's pretty much what I do, except each file has a list of small subtriggers. That way, if we need to add another action (e.g. another secondary update) or to temporarily suspend an action, they can be added into or knocked out of the list. The overhead is on calling the master trigger in the first place, rather than in the number of routines called from then. OF course, any complex updates that are not time-critical are logged to a workfile and then handled by phantoms, to keep the load away from the most sensitive major file updates. Brian > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Bill Haskett > Sent: 10 October 2008 14:50 > To: [email protected] > Subject: RE: [U2] Universe Triggers > > 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/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
