Image description: error handling for QSAM files
This image is a flowchart that shows the flow of execution after an input or output error on a QSAM or line-sequential file.
The following steps describe input-output system processing:
- The file status field is set if a FILE STATUS clause was specified for the file.
- The program is checked for the presence of the following error
handling features, in the order shown:
- An applicable exception phrase,* such as ON INVALID KEY or AT END-OF-PAGE. The imperative statements associated with the exception phrase are executed.
- An associated error declarative, such as USE AFTER EXCEPTION. The declarative procedure is executed.
- A FILE STATUS clause for the file. The file status key is tested.**
- After one of the error handling features is found and the associated code is executed, the input-output system returns control to the COBOL program at the end of the I/O statement.*** Normal processing continues.
- If none of the error handling features is found, the run unit terminates with a message.
End of image description.