sysVar.sqlerrd
The system array sysVar.sqlerrd is a static 6-element array, where each element contains the corresponding SQL communication area (SQLCA) value that was returned from the last SQL I/O option. The value in sysVar.sqlerrd[3], for example, is the third value and indicates the number of rows processed for some SQL requests.
Of the elements in sysVar.sqlerrd, only sysVar.sqlerrd[3] is refreshed by the database management system for Java code or at debugging time.
You can use a sysVar.sqlerrd element in these ways:
- As the source in an assignment or move statement
- As the value in the for count clause of a move statement
- As a variable in a logical expression
- As the argument in an exit or return statement
The characteristics of each element in the sysVar.sqlerrd array 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
myItem = sysVar.sqlerrd[3];
Related concepts
Segmentation in text applications
SQL support
Related reference
File and database (system words)