sysVar.sqlState
The system variable sysVar.sqlState contains the SQL state value 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.sqlState in these ways:
- As the source in an assignment or move statement
- As a variable in a logical expression
- As the argument in an exit or return statement
The characteristics of sysVar.sqlState are as follows:
- Primitive type
- CHAR
- Data length
- 5
- Is value always restored after a converse?
- Only in a non-segmented text program; for details see Segmentation
Example
rcitem = sysVar.sqlState;
Related concepts
Segmentation in text applications
SQL support
Related reference
Exception handling and status (system words)
File and database (system words)