sqlcode

The system variable SysVar.sqlcode contains the return code for the most recently completed SQL I/O operation. The code is obtained from the SQL communications area (SQLCA) and can vary with the relational database manager.

You can use SysVar.sqlcode in these ways:

The characteristics of SysVar.sqlcode are as follows:
Primitive type
BIN
Data length
9
Is value always restored after a converse?
Only in a non-segmented text program; for details see Segmentation

Example

  rcitem = SysVar.sqlcode;
Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.