EGL Reference Guide for iSeries
In relation to I/O statements, an error can be hard or soft:
- A soft error is any of these--
- No record was found during an I/O operation on an SQL database table
- One of the following problems occurs in an I/O operation on an indexed,
relative, or serial file:
- Duplicate record (when the external data store allows insertion of a
duplicate)
- No record found
- End of file
- A hard error is any other problem; for example--
- Duplicate record (when the external data store prohibits insertion of a
duplicate)
- File not found
- Communication links are not available during remote access of a data set
If a soft I/O error occurs in a try block, the generated program continues
running. If a hard I/O error occurs in a try block, the consequence
depends on the value of an error-related system variable:
- During access of a file, relational database, or MQSeries message queue,
the following rules apply--
- If sysVar.handleHardIOErrors is set to 1, the program
continues running
- If sysVar.handleHardIOErrors is set to 0, the program
presents an error message, if possible, and ends
If either a hard or soft I/O error occurs outside of a try block, the
generated program presents an error message, if possible, and ends.
If you are accessing DB2 directly (not through JDBC), the sqlcode for a
hard error is 304, 802, or less than 0.
[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.