DB2 SQL return codes
SQL Return Codes are used on a day-to-day basis for the diagnosis of programming failures as a result of SQL calls by IBM Db2 programs. An important feature of IBM Db2 programs is the error processing. The error diagnostic containing the SQL Return Code is held in the field SQLCODE within the Db2 SQLCA block. SQLCODE is no longer part of the SQL-standard. The SQL-standard replaced SQLCODE by the more detailed SQLSTATE. SQLCA. The SQL communications area (SQLCA) structure is used within the IBM Db2 program to return feedback to the application  program. SQLCODE. The SQLCODE field contains the SQL return code. The code can be zero (0), negative or positive: Here is a more comprehensive list of the SQLCODEs for DB2. Note that this list is not exhaustive. Also note that some SQLCODEs may only occur in specific Db2 products; e.g., only on Db2 z/OS, only on Db2 LUW, or only on Db2 for IBM i. Zero (Successful). 0 Successful