Previous Topic Next topic Print topic


SQLCODE (DB2 Mode)

SQLCODE is an element of the SQLCA that stores a warning or return code from an SQL process. If you are running in DB2 mode, the value in SQLCODE is a DB2 warning or return code. To determine the appropriate error code, you must translate it into an XDB error message ID using the formula listed in the table below.

SQLCODE Value Error Type Formula Msg File
-1 to -999 Remote DBMS Error Take absolute value and prefix with "L" XDBMF.ERR
-1001 to -1650 Database Engine Error Take absolute value, subtract 1000, prefix with "X". XDBRES.ERR
-1651 to -3000 Network Error Take absolute value, subtract 1650, prefix with "N". XDBNET.ERR
-3001 to -29,999 Not used. -- --
-30,000 to -30,100 Distributed DBMS Communication Error Take absolute value and prefix with "L". XDBMF.ERR
Note:

Error messages -1 through -999 and -30,000 through -30,100 that come back through XDB Link are native to the remote DBMS being accessed.

Previous Topic Next topic Print topic