I added a physical file trigger for *after and *insert. When I do an insert, the trigger does not call my program and I get a CPF502B message.
                                                                             Message ID . . . . . . :  DFU0843      Severity . . . . . . . :  40       Message type . . . . . :  Diagnostic                                        Date sent . . . . . . :  11/16/10     Time sent . . . . . . :  17:57:54                                                                              Message . . . . :  EXIT DFU and SIGNOFF IMMEDIATELY. To allow data base roll  back of data. CPF502B caused the problem.                                  Cause . . . . . :  A Referential Constraint Violation of Trigger program     failure occurred during a PUT by DFU to the data base. Data changes will be  rolled back once SIGNOFF from the current job is done. DO NOT CONTINUE to  enter or change data as it will be rolled back as well once you signoff.   Recovery . . . :  EXIT DFU and SIGNOFF IMMEDIATELY. To allow Data Base to   roll back the change to the file that resulted in the error. DO NOT CONTINUE  to make changes to the file until you have SIGNED OFF or all these changes  will be rolled back as well. Use DSPMSGD to get details about the message   listed. Then, correct the error and try again.                             Technical description . . . . . . . . :  DFU was performing a data-base    Â
This also happens in RPG and with SQL
Software/Hardware used:
AS400
ASKED:
November 16, 2010 10:58 PM
UPDATED:
November 23, 2010 7:29 PM
Please run DSPFD against your file. Copy/paste the ‘Trigger Description’ section here.
It probably would also been more useful if you had shown us the CPF502B rather than the DFU error. Possibly also error messages before the CPF502B that describe the conditions. If you can recreate the problem, please show us the error that DFU refers to.
Tom
Looks like the trigger program is trying to do something that is not allow by the referential constraints you have on the file.
Check you constraint information with whatever you are trying to do in the trigger program.
…the trigger does not call my program…
The ‘trigger’ does call your program. The problem is that your program blows up. We’re trying to determine up blows up.
Tom
…determine up blows up.
Sheesh. “…determine why it blows up.”
Tom