COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-151
OPEN
°
The COBOL program describes the records of the file as having an odd
number of characters, the file system description of the file does not
include the “odd-unstructured” attribute, and the file size is some integer
multiple of (COBOL record size plus 1).
°
If the file code is 101 (EDIT format) because either the file already exists
with that code or an ASSIGN command with a CODE phrase has been
processed for the file, the file can be opened in INPUT, OUTPUT, or
EXTEND modes. Opening the file for OUTPUT deletes any existing
records in the file and starts the line numbers at 1, and increments by 1.
Opening the file for EXTEND retains existing records and starts the line
numbers at 1 greater than the number of the last line in the file, and
increments by 1. An EDIT-format file cannot be opened for OUTPUT or
EXTEND if the NONSTOP directive has been specified.
°
If the file code is 180 (line sequential, available only in the OSS
environment).
°
The file must be described as having fixed-length records (absence of the
rec-1 TO phrase and the VARYING phrase in the RECORD clause).
°
If the file is opened in EXTEND mode, the file position indicator is
advanced to the end of the file.
Structured Disk Files Not Present at Run Time
The open mode determines what happens when a structured disk file is not
present at run time.