Since it's a subroutine, shouldn't you RETURN to get out, not STOP? Also, once you get this running, be sure to CLOSE any files that it OPENs or you will have problems.
Here is another tip: triggers need to be cataloged globally. However, they can call other subroutines that are cataloged locally/directly. All of our trigger programs do is simply call a 2nd directly cataloged subroutine. It is this 2nd subroutine that does all the work. This allows us to test in a 2nd account without clobbering the live version. John Israel Sr. Programmer/Analyst Dayton Superior Corporation 721 Richard St. Dayton, OH 45342 937-866-0711 x44380 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of George Gallen Sent: Monday, July 13, 2009 10:51 AM To: U2 Users List Subject: Re: [U2] UV and triggers (ERROR -4) At least the trigger fires....Do I need to set a flag so the write goes through? George ED NABTP NEWONE 0001: TEST 0002: TEST :FI TRIG1 NEWONE Program "ED": pc = 726C, Trigger program "*TRIGGER_EMAIL" did not complete. Program "ED": pc = 726C, Error performing trigger for "N&ABTP". Failed to file "NEWONE" in file "N&ABTP". STATUS = -4 SUBROUTINE TRIGGER_EMAIL(TRIGGERNAME,SCHEMA,TABLE,EVENT,TIME,NEWRECID,NEWREC,OLDRECID, OLDREC,ASSOC,ASSOCEVENT,COUNT,CHAINCASCADE,CASCADE) * * ***************************************************************************** * PRINT TRIGGERNAME,OLDRECID,NEWRECID,ASSOCEVENT STOP END _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
