COBOL Manual for TNS and TNS/R Programs

Environment Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
6-37
FILE-CONTROL Paragraph
If the RESERVE clause specifies a number that uses HP COBOL Fast I-O and
the assigned file qualifies for HP COBOL Fast I-O, but there is not enough buffer
space for HP COBOL Fast I-O, then the I-O status code is “07” and sequential
block buffering is used.
If you run out of disk space, the corrupt bit is set, the program terminates
abnormally, and you cannot open the file. If the file is entry-sequenced, use FUP to
clear the corrupt bit. If the file is not entry-sequenced, the file is unusable.
An auxiliary block buffer can be shared by two files in a program as long as both
are not open at the same time. The space is allocated as part of the open
operation and deallocated as part of the close operation. The SAME AREA clause
has no effect on space allocation or deallocation.
Example 6-5 contains two simple sequential files:
°
An input file that the COBOL program recognizes as MASTER1-IN and to the
operating system as NAMEFILE in a subvolume name SUB1 on a disk drive
named $BULK.
°
An output file that the COBOL program recognizes as REPORT-OUT and to
the Guardian environment as a DEFINE named =ROSTER-PRINTER.
Example 6-5. FILE-CONTROL Paragraph for Sequential File
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT MASTER1-IN
ASSIGN TO "$BULK.SUB1.NAMEFILE"
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
SELECT REPORT-OUT
ASSIGN TO "=ROSTER-PRINTER"
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL.
...
DATA DIVISION.
FILE SECTION.
FD MASTER1-IN
LABEL RECORDS ARE OMITTED.
...
FD REPORT-OUT
LABEL RECORDS ARE OMITTED.
...