EGL Reference Guide for iSeries

Error identification

You can determine what kind of error occurred in a try block by including a case or if statement inside or outside the try block, and in that statement you can test the value of various system variables. If you are responding to an I/O error and if your statement uses an EGL record, however, it is recommended that you use an elementary logical expression. Two formats of the expression are available:

  recordName is IOerrorValue
 
  recordName not IOerrorValue
recordName
Name of the record used in the I/O operation
IOerrorValue
One of several I/O error values that are constant across database management systems

If you don't use the logical expressions with I/O error values and then change database management systems, you may need to modify and regenerate your program. In particular, if you are using JDBC, it is recommended that you use the I/O error values to test for errors rather than the value of sysVar.sqlcode or sysVar.sqlStateor the equivalent values in sysVar.sqlca. Those values are dependent on the underlying database implementation when JDBC is in use.


Related concepts
Compatibility with VisualAge Generator


Related reference
EGL Java run-time error codes
Exception handling and status (system words)
sysVar.handleHardIOErrors
sysVar.handleOverflow
sysVar.overflowIndicator
sysVar.handleSysLibErrors
sysVar.sqlca
sysVar.sqlcode
sysVar.sqlState
sysVar.mqConditionCode
sysVar.errorCode
I/O error values
Logical expressions
EGL statements


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]