SQL execution diagnostic registers
If an SQL statement execution failed, error description can be found in the SQLCA.SQLCODE, SQLSTATE, STATUS and SQLERRMESSAGE predefined registers.
The SQLCA diagnostic record
The SQLCA variable is a predefined record containing SQL statement execution information.