All errors in processing a VSAM file, whether logic errors in your program
or I/O errors on the external storage media, return control to your COBOL
program. When an error occurs, the status key value will indicate the
status of the last request on the file. Refer to VS COBOL II Application
Programming Language Reference if you need to know the status key values
and their meanings for VSAM files.
Because file problems do not usually cause an abend, it is possible that
your program will continue executing with invalid information. Good
coding practice demands that you check the file status key value after
every input/output request (including OPEN and CLOSE). Each VSAM file
should have its own status key defined in your program. For more
information, see "File Status Key" in topic 4.4.3.
You can also use an ERROR/EXCEPTION declarative for handling input/output
errors for VSAM files
No comments:
Post a Comment