Image description: error handling for VSAM files
This image is a flowchart that shows the flow of execution after an input or
output error on a VSAM 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. The
imperative statements associated with that 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.
- 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 following action is
taken:
- If the error occurred on an OPEN or CLOSE statement, normal processing
continues.
- If the error occurred on another input-output statement, such as a
READ or a WRITE, the run unit is terminated with a message.
End of image description.
|