Support for VSAM processing in OS/VS COBOL Release 2 and in the
OS/VS COBOL compatibility library routines is consistent with the
I/O language specified in the COBOL standard, American National Standard
COBOL, X3.23-1974. However, OS/VS QSAM and VSAM support in OS/VS COBOL
Release 1 is not consistent with the standard.
- File status
-
The FILE STATUS clause is optional. Specifying FILE STATUS
for a VSAM file lets you monitor the status of the file's I/O operations
by testing the FILE STATUS values. Code the FILE STATUS clause for
all appropriate files and test the FILE STATUS (status key) after
each input/output statement, including the OPEN statement. FILE STATUS
detects error conditions so you can handle them before processing
continues.
If you do not specify FILE STATUS and test for the
appropriate status key values, you might get undetected errors and
erroneous program results.
- User abends
- In certain error situations during VSAM file processing, Release
1 of the OS/VS COBOL library modules forced user abends during program
execution. OS/VS COBOL Release 2 support eliminated four of these
user abends. In place of the abends, a FILE STATUS value is set when
an I/O operation fails, and execution continues.
Status key values
are set to 90, 93, 95, or 95 rather than the forced USER ABEND 0100,
0201, 0303, or 0304, respectively. The program should test the status
key value after each I/O operation to make sure its successful completion.
OS/VS COBOL Release 2 support also no longer issues the object-time
message 'IKF302I'. In place of this message, the FILE STATUS is set
to a value of 30.
Because some users might depend on the previous
abends and message, you can apply superzaps as user modifications
to continue to force USER ABEND 0100, 0201, 0303, or 0304, and continue
to force message IKF302I. The IGZWZA1 USERMOD in the IGZWZAP sample
job contains the superzaps to do this.