While running SQL SP, some times i am getting error:
-804: [SQL State] 07002: [IBM][CLI Driver][DB2/6000] SQL0804N The application program input paramet
ers for the current request are not valid. Reason code "102". If a host variable or SQLVAR in the SQLDA is invalid then: host variable/SQLVAR number = "10", SQLTYPE = "167213132", SQLLEN = "13132", host variable/SQLVAR type = "INPUT". SQLSTATE=07002
The error does not occur every times. coupe of times SP gets executed smoothy. The SP is caiing other 4 SPs to compete the processing.
Well the reason code indicates the SQLTYPE is invalid, and it certainly looks unhealthy. http://publib.boulder.ibm.com/infoce...n/r0001030.htm has a list of valid sqltypes. I've found that -804s are symptomatic of a program overwriting its memory areas - including the sqlda.
All I can suggest is grabbing the C code generated by the SQL preprocessor and doing some debugging at that level.