I have an application in VB.NET which is generating some -301 errors in DB2 on an update statement using an ADO.NET connection.
It appears that DB2 reports the occurrence of this error, but then fixes whatever data was wrong and resubmits. This fixing and resubmission comes with additional overhead and in turn real dollars and cents cost because this is mainframe DB2.
Is there a way to detect this -301 error in some way? I am not able to recreate the problem. I only know this is happening because DB2 reports that the error occurred, but because I am using a parameterized query and due to the configuration of DB2 I am not able to determine the values of the parameters.
At this point I think that my best bet is to serialize the inputs that I am getting and then write them out to xml and when my DBA is able to tell me when an error occurs, I will take the file and then reprocess in a test environment one by one. That is, unless there is something which I can check, like a return code, and then send an error email with a serialization of the offending object instance.