about triggers

JDE_WROX

JDE_WROX

Active Member
I have triggered a physical file, after the insert statement, Iam getting the error RPG1299, I have looked in to the error messages for RPG1299 it says there is a problem in I/O operation.
pl some one can help me in the trigger program.
 
I would work with IBM to help you find the joblog and error messages surrounding this one rpg1299, it is a general message. I/O errors can be caused by things like trying to add a duplicate record or trying to delete a record that does not exist.
 
RPG1299 is a general “I/O error occurred” message, kind of a catch-all error message. It is always preceded by other messages in the joblog that indicate the real reason for the error.

There are two possible error causes, either system generated the error (i.e. failure encountered accessing a locked record) or failure was detected by the trigger program (i.e. invalid data found so trigger programs sends an escape message using QMHSNDPM api).

In case of system generated error, the system generates an exception that looks for an exception handler in the trigger. If none is found, the exception traverses the invocation stack in reverse order searching for an appropriate exception handler. If an exception handler does not handle the exception, the exception is processed by the system database module that is performing the I/O operation that fired the trigger (probably QDBPUT system module). The I/O operation will fail.

In case of failure detected by trigger program, if the trigger determines that invalid data is being inserted, the insert operation has to be rejected. This can be achieved by sending an escape message (using QMHSNDPM) to the call stack entry where QDBPUT is running.

You need to locate the joblog of the failing job and see what error messages preceded RPG1299. This will help you figure out what really caused the failure.

E-mail me if you need help ;-)
 
Back
Top