All embedded SQL statements or DB2 CLI calls in your program, including those that request DB2 extender UDFs, generate codes that indicate whether the embedded SQL statement or DB2 CLI call ran 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 the codes that are returned by embedded SQL statements, CLI calls, and APIs.
For information on handling these return codes, see Chapter 19, Diagnostic information.
In situations where an extender API cannot successfully compelete its unit of work, a rollback operation is performed. The API also returns an error code. The rollback operation is done so that the database can be returned to its previous consistency point. Refer to Chapter 16, Application programming interfaces for details.