35 pts.
 AS/400 Physical File Triggers
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

Answer Wiki:
I looked through some of the related questions after I submitted this, and this question was asked once before. I was able to get it to work. Somewhere in the answers someone mentioned that if you use CLP it is looking for some kind of parameters. The person mentioned to make it a CLLE program. I made it a CLLE, recompiled, and that fixed it. For some reason or other the CLLE is not requiring any parameters. None of this is in the trigger manuals from IBM. I thank all of you for your help and we can consider this question answered. Lenny
Last Wiki Answer Submitted:  November 23, 2010  7:29 pm  by  AS400X   35 pts.
All Answer Wiki Contributors:  AS400X   35 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

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

 108,005 pts.

 

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.

 32,835 pts.

 

…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

 108,005 pts.

 

…determine up blows up.

Sheesh. “…determine why it blows up.”

Tom

 108,005 pts.