COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-145
OPEN
Table 9-4. I-O Status Codes for Unsuccessful Open Operations
I-O
Status
Code Unsuccessful Open Operation
“30” One of:
•
The file was to be opened for OUTPUT and an existing disk file with
unsuitable attributes cannot be purged.
•
The file was to be opened for OUTPUT and the data in an existing disk file
cannot be purged.
•
The file was to be opened for EXTEND and the file cannot be positioned at
its end.
•
The open operation failed due to some cause outside COBOL.
“35” The file was to be opened for INPUT, I-O, or EXTEND; the file is not optional; and
the file does not exist.
“37” One of:
•
The file was to be opened for INPUT, but the device is not suitable for INPUT.
•
The file was to be opened for OUTPUT, but the device is not suitable for
OUTPUT.
•
The file was to be opened for I-O, but the device is not suitable for I-O (both
input and output). Only disks and terminals can be opened for I-O.
“38” The file is locked.
“39” The attributes of the file under the file system do not correspond to the attributes
specified for the file in the program, for example:
•
The file was to be opened for INPUT but it is assigned to a printer device.
•
The file description includes a LINAGE clause, but the file is assigned to a
tape drive.
•
The file description includes a MULTIPLE FILE TAPE clause, but the file is
not assigned to a tape drive.
•
The file is described as having keys, but the file is assigned to a nondisk file.
•
The prime record key attributes of a disk file are inconsistent with the
description for the COBOL file.
•
The alternate record key attributes of a disk file are inconsistent with the
description for the COBOL file.
“41” The program already has that file open, or the file is one of several on a tape reel
and another of the files on the reel is open.
“91” The file is an EDIT format, unstructured disk file and the call to the operating
system routine that reads EDIT files failed. The open operation cannot allocate a
resource required to process the file.