Use this statement with ESQL/C.
(1) >>-GET DIAGNOSTICS--+-| Statement Clause |------+-------------->< | (2) | '-| EXCEPTION Clause |------'
The GET DIAGNOSTICS statement retrieves specified status information that the database server records in a structure called the diagnostics area. Using GET DIAGNOSTICS does not change the contents of the diagnostics area.
The GET DIAGNOSTICS statement uses one of the following two clauses: