The system variable SysVar.sqlca contains the entire SQL communication area (SQLCA). As noted later, the current values of a subset of fields in the SQLCA are available to you after your code accesses a relational database.
You can use SysVar.sqlca in these ways:
In order to refer to specific fields in the SQLCA, you must move SysVar.sqlca to a base record. The record must have a structure as specified in the SQLCA description for your database management system. Use the base record if you pass the SQLCA contents to a remote program so that the contents will be converted correctly to the remote system data format.
myItem = SysVar.sqlca;
Related concepts
Segmentation in text applications
SQL support
Related reference
System variables outside of EGL libraries
sqlcode
sqlState
sqlerrd
sqlWarn