The following table describes the EGL error values for input/output (I/O) operations that affect databases, files and WebSphere® MQ message queues. If you use V6 exception compatibility (see Using V6 exception compatibility), you have access to both hard and soft I/O errors (see is/not operator). For more information, see Exception handling.
Error value | Type of error | Type of Record | Meaning of error value |
---|---|---|---|
deadlock | Hard | SQL | Two program instances are trying to change a record, but neither can do so without system intervention. If you are accessing an SQL table in DB2®, deadlock indicates that the value of sqlcode is -911. |
duplicate | Soft | DL/I, Indexed, or Relative | For more information, see "duplicate" in this topic. |
endOfFile | Soft | DL/I, Indexed, Relative, Serial | For more information, see "endOfFile" in this topic. |
ioError | Hard or Soft | Any | For more information, see "ioError" in this topic. |
fileNotAvailable | Hard | Indexed, Relative, Serial | fileNotAvailable is possible for any I/O operation and can indicate, for example, that another program is using the file or that resources needed to access the file are scarce. |
fileNotFound | Hard | Indexed, Message queue, Relative, Serial | fileNotFound is possible for any I/O operation and indicates that a requested file was not found. |
full | Hard | Indexed, Relative, Serial | full is set in these cases:
|
hardIOError | Hard | Any | For more information, see "hardIOError" in this topic. |
invalidFormat | Hard | Indexed, Relative, Serial | The accessed file is incompatible with the record definition. For more information, see "invalidFormat" in this topic. |
noRecordFound | Soft | Any | For more information, see "noRecordFound" in this topic. |
softIOError | Soft | Any | A soft error occurred, which is endOfFile, noRecordFound, or duplicate. |
unique | Hard | DL/I, Indexed, Relative, SQL | Your code tried to add or replace a record having a key that already exists, and the attempt failed. For more information, see "unique" in this topic. |
The duplicate setting is returned only if the access method returns the information, as is true on some operating systems but not on others. The option is not available during SQL database access.
If you are accessing an emulated VSAM file from an EGL-generated COBOL program on iSeries®, see "Association elements" in the EGL Generation Guide for a description of the duplicates property in the resource associations part that is used at generation time.
For a DL/I database, duplicate is a soft error, set when an add statement tries to insert a segment into a database in which records with duplicate keys are not permitted and a record with the same key already exists in the database. The add failed. The corresponding status code is II. The duplicate and unique values are equivalent for DL/I.
For a DL/I database, endOfFile is set when a get next or get next inParent statement attempts to retrieve data and the related database pointer is at the end of the database. The corresponding status code is GB.
The file format (fixed or variable length) is different from the EGL record format.
In relation to fixed-length records, the length of a record in the file is different from the length of the EGL record. In relation to variable-length records, the length of a record in the file is larger than the length of the EGL record.
The file type specified for the record does not match the file type at run time.
The key length in the file is different from the key length in the EGL indexed record.
The key position in the file is different from the key position in the EGL indexed record.
The unique setting is returned only if the access method returns the information, as is true on some operating systems but not on others.
During SQL database access, unique is set when a SQL row being added or replaced has a key that already exists in a unique index. The corresponding sqlcode is -803.
For a DL/I database, unique is set when an add statement tries to insert a segment into a database in which records with duplicate keys are not permitted and a record with the same key already exists in the database. The add failed. The corresponding status code is II. The duplicate and unique values are equivalent for DL/I.