Hi Bill, What you have is the simplest form of the wrapper. I had to create a 'generic' wrapper so I had to add logic to deal with the possible return values of execstat and the possibly amended record. As the wrapper is making the multiple calls it now has the responsibility of quitting at the appropriate time and maintaining the record value between subroutine calls.
I'm on leave today, but I will post the 2 wrappers I have for update and delete as soon as I get a chance. Regards Raymond de Bourbon -----Original Message----- From: "Bill Haskett" <[EMAIL PROTECTED]> To: "u2-users@listserver.u2ug.org" <u2-users@listserver.u2ug.org> Sent: 17/03/06 00:44 Subject: RE: [U2] [UD] Trigger (singular) Raymond: Thanks. I'm thinking the following ought to do the trick (unless, of course, I've missed something). :-) SUBROUTINE U2T.APVENDOR.U (ExecStat, DictFlag, atFILENAME, atID, atRECORD) ** Update trigger for APVENDOR file on UniData ** (C) Copyright 1985-2004, Advantos Systems, Inc. All Rights Reserved. ! ** Last Modified: 16 Mar 2006, wph ** First Created: 16 Mar 2006, wph ** Program Type-: Trigger (Web) ! ** Notes: ** ** This is a "trigger" program placed on the (APVENDOR) file. It has ** to execute all UPDATE triggers for this file. ** **-------------------------------------------------------------------** ** ** ** I N I T I A L I Z A T I O N ** ** ** **-------------------------------------------------------------------** * CALL U2.NAMES.BRIDGE.U (ExecStat, DictFlag, atFILENAME, atID, atRECORD) CALL U2.HOMETASTIC.UPD (ExecStat, DictFlag, atFILENAME, atID, atRECORD) * **----------------------------------------------------------------** ** ** ** E N D O F P R O G R A M ** ** ** **----------------------------------------------------------------** * RETURN END Bill Haskett Advantos Systems, Inc. www.advantos.net (760)944-5570 (CA) (360)923-4838 (WA) > -----Original Message----- > From: Raymond de Bourbon [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 16, 2006 2:21 PM > To: Bill Haskett; u2-users@listserver.u2ug.org > Subject: RE: [U2] [UD] Trigger (singular) > > Hi Bill, > > You are correct, Unidata only supports one trigger for both > update and delete. In order to have multiple triggers you > need a wrapper program... I can send you the source if you want. > > Regards > > Raymond de Bourbon > > > -----Original Message----- > From: "Bill Haskett" <[EMAIL PROTECTED]> > To: "u2-users@listserver.u2ug.org" <u2-users@listserver.u2ug.org> > Sent: 16/03/06 21:03 > Subject: [U2] [UD] Trigger (singular) > > I'm almost done with triggers (thank goodness I only have a > few to create). > It appears UniData only allows one trigger created on a file > at a time. Is > this true? > > 2 Dtademo (0)-> LIST-TRIGGER APVENDOR > BEFORE UPDATE TRIGGER: U2.NAMES.BRIDGE.U > BEFORE DELETE TRIGGER: U2.NAMES.BRIDGE.D > 2 Dtademo (0)-> CREATE-TRIGGER APVENDOR U2.HOMETASTIC.UPD UPDATE > The specified trigger already exists. > > The documentation doesn't mention this at all. So, in order > to get multiple > triggers on a file would I have to create a "wrapper" BASIC > program that > CALLs each trigger program as a subroutine (or EXECUTEs each trigger > program)? > > Any enlightenment would be appreciated. :-) > > Bill Haskett > ------- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/