|
Are you sure that escape messages will even work for this task?
Sending an escape message is intended for when a program calls another program. If the second program ends abnormally, it uses an escape message to trigger an exception to the caller. If the caller doesn't catch that exception, then it will also crash, and the cycle continues until either a program handles the error, or you get back to the command line.
However, in your case, what you've got is the operating system running a routine to update/insert a record in your database. You see, when you tell your RPG program to update or write a record, it calls a DB2/400 routine in order to do the actual work. That DB2/400 routine will, eventually, call your trigger program.
So, your program stack at the time that the trigger runs will look something like this:
1 P_PEP_CSUPDT <-- ILE program entry procedure for CSUPDT 2 CSUPDT <-- ILE procedure CSUPDT 3 _DB_UPDATE <-- database update routine 4 QDBUDR <-- routine called by database update 5 _TRGCSDELR <-- entry procedure for trigger 6 TRGCSDELR <-- the trigger's main procedure
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.