sysVar.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;

Related concepts
Segmentation in text applications
SQL support

Related reference
File and database (system words)