All embedded SQL statements in your program and DB2 CLI calls in your program, including those that invoke DB2 extender UDFs, generate codes that indicate whether the embedded SQL statement or DB2 CLI call executed successfully. Other DB2 extender APIs, such as administrative APIs, also return codes that indicate success or lack of success. Your program should check and respond to these return codes.
Your program can also retrieve information that supplements these codes. This includes SQLSTATE information and error messages. You can use this diagnostic information to isolate and fix problems in your program.
Occasionally the source of a problem cannot be easily diagnosed. In these cases, you might need to provide information to service personnel to isolate and fix the problem. The DB2 extenders include a trace facility that records extender activity. The trace information can be valuable input to service personnel. You should use the trace facility only under instruction from IBM service personnel.
This chapter describes how to access this diagnostic information. It describes:
It also lists and describes the SQLSTATEs and error messages that can be returned by the extenders.