|
A trigger will call an RPG, although the recommendation is to call a shell CL that calls the RPG so you can easily modify the RPG without having to reapply the trigger. The recursion error leads me to believe you are trying to add a record to the file that has the trigger, i.e. if FILEA has trigger PGMB and PGMB writes a record to FILEA, voila! you have recursion. This can also happen if PGMB writes to FILEC which is a logical based on FILEA. You can also have problems if the file has SHARE(*YES). hth Peter Dow Dow Software Services, Inc. 909 425-0194 voice 909 425-0196 fax From: a b <eagle_291@yahoo.com> > I was wondering if someone could possibly point me in > the right direction or tell me what it might be that > I'm doing wrong. I'm trying to execute an RPG program > from a Physical File Trigger after and SQL insert is > performed, but it continues to crash. Will a trigger > ONLY call a CL program, or will it call an RPG? > > My attempt is to perform the following; Insert a row > into a physical file, execute an RPG program which > then performs data population in other files. > Message . . . . : An error in the trigger program > was detected before WRITE > on file EXXXXX1PX (C G D F). > > Cause . . . . . : RPG procedure EFXXX1R in program > MISTEMP/EFXXXK1R > detected an error in the trigger program before > WRITE operation was done on > file EFXXX1PX. The actual file is > MISTEMP/EFDXXX1PX(EFXXXXR1P). The WRITE > operation was not performed. > > > Message . . . . : EFDXXX1R was called recursively. > > Cause . . . . . : RPG procedure EFDXXXX1R in > program MISTEMP/EXXXXK1R > called itself or another procedure which then > called procedure EXXXX1R. > > ---------------------------------------------------- > > > > > > __________________________________________________ > Do You Yahoo!? > Talk to your friends online with Yahoo! Messenger. > http://im.yahoo.com > +--- > | This is the RPG/400 Mailing List! > | To submit a new message, send your mail to RPG400-L@midrange.com. > | To subscribe to this list send email to RPG400-L-SUB@midrange.com. > | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: david@midrange.com > +--- __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.