The following table shows DB2 SQLCODEs and the Adabas SQL Gateway SQLCODEs that correspond to them. You can use this table to set up Adabas SQL Gateway SQLCODE-to-DB2 SQLCODE definitions in the CXGCIOPT module.
Note:
Code translation is only performed on the following values: SQLCODE,
SQLSTATE, and SQLCA. The values returned by the GET DIAGNOSTICS statement are
not translated.
| DB2 SQLCODE | Adabas SQL Gateway SQLCODE | Description |
|---|---|---|
| -305 | -4018 | A target host variable has been specified without an accompanying indicator variable and the corresponding field has returned null. |
| -4019 | Value returned from server truncated and no indicator present. | |
| -501 | -4011 | An attempt was made to access a Cursor which is currently not open. |
| -502 | -4010 | An attempt was made to open a Cursor which is already open. |
| -803 | -198 | Duplicate key error has occurred processing a user table; e.g. an attempt was made to duplicate a descriptor |
| -811 | -4038 | Execution of an embedded SELECT statement or a sub-SELECT in the SET clause of an UPDATE statement has resulted in a result table that contains more than one row. Alternatively, a sub-query contained in a basic predicate has produced more than one value. |
| -842 | -3504 | A connection already exists. |
| -4008 | A connection already exists. | |
| -900 | -3506 | No active connection. |
| -4002 | Application process is not connected to a server. | |
| -4032 | SQL Driver NOT connected. | |
| -911 | -9 | "Timeout" has occurred while processing unit of work. The user transaction has been rolled back. |
| -145 | "Deadlock" has occurred while processing unit of work. The user transaction has been rolled back. | |
| -923 | -3505 | Connection not established. |
| -4003 | Connection not established. | |
| -4012 | Connection not established (DSN missing or invalid). | |
| -4013 | Invalid connect parameters (DSN probably not registered). | |
| -950 | -4022 | The location name specified in the CONNECT statement is invalid (HOST ADDRESS missing or invalid). |