sysVar.sqlData
sysVar.sqlData is a structured record
that contains the same system variables that are defined in structured
record sqlLib.sqlData. The variables in
both records are updated after your program accesses a relational
database. The differences between the two records are as follows:
- The scope of sysVar.sqlData is limited to a main part with executable code (a Program, Library, Service, or Handler). For example, if programA calls programB and both programs access a relational database, each program has its own copy of sysVar.sqlData. The values set in programB are not available after you return to programA.
- The scope of sqlLib.sqlData is global across the programs in the run unit. For example, if programA calls programB and both programs access a relational database, the values set by the last relational database access in programB are available in programA immediately after the return to programA and until the next relational database access.
In either case, the value of the variable is not saved across a segmented converse.
For the record structure, see sqlLib.sqlData (EGL system variable).
EGL maintains sysVar.sqlData for compatibility with VisualAge® Generator and earlier releases of EGL. In addition, use sysVar.sqlData when you want to limit the scope of the SQL information to a single program or if you are using COBOL generation.
EGL maintains sqlLib.sqlData for compatibility with I4GL. In addition, if you are using Java™ generation and using a library function to do SQL I/O, you can use sqlLib.sqlData to check the SQL results of the library function after the return to the invoking function.
Value saved across segmented converse?
NO
Compatibility
| Platform | Issue |
|---|---|
| Java™ generation | Java™ only sets sqlcode, sqlstate, sqlerrd[2], sqlerrd[3], and sqlwarn[2]. In Java™ the sqlca data structure is not passed to and from the database with each I/O operation, so EGL sets whatever fields it can. The user can modify other fields, but EGL Java™ does not use them. |