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:
- As the source in an assignment or move statement (also allowed in the "for count" of a move statement)
- As a variable in a logical expression
- As the argument in an exit or return statement
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)