COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
• Use of the READ NEXT Statement on Relative, Indexed, or Queue Files
The READ NEXT statement operates on a relative, indexed, or queue file only if the file is
declared with ACCESS MODE SEQUENTIAL or ACCESS MODE DYNAMIC.
• Sequential Block Buffering and HP COBOL Fast I-O
Sequential block buffering, enabled by the RESERVE clause of the FILE-CONTROL Paragraph,
is an Enscribe feature that speeds the reading of a sequential, relative, indexed, or queue file
by reading a block of records together into a memory buffer. HP COBOL Fast I-O is a variant
of sequential block buffering that is even faster, because the run-time routines handle the record
deblocking.
For either of these features, the file’s access must be sequential. Its file organization must be
sequential, relative, indexed, or queue. See FILE-CONTROL Paragraph (page 115).
• Eight-Character Volume Names and HP COBOL Fast I-O
If you use an eight-character volume name in this context, you do not get an error or warning,
but you get normal output instead of fast output. (Input is not affected.)
Example 126 Reading a Sequential File
IDENTIFICATION DIVISION.
...
ENVIRONMENT DIVISION.
...
SELECT INPUT-DATA
ASSIGN TO "$TAPE"
ORGANIZATION IS SEQUENTIAL
ACCESS MODE IS SEQUENTIAL
FILE STATUS IS INPUT-DATA-FILE-STATUS.
...
DATA DIVISION.
FILE SECTION.
FD INPUT-DATA.
01 INPUT-RECORD.
...
WORKING-STORAGE SECTION.
...
01 FILE-STATUSES.
03 INPUT-DATA-FILE-STATUS PICTURE XX.
...
PROCEDURE DIVISION.
...
READ INPUT-DATA
AT END CLOSE INPUT-DATA
END-READ
IF ...
Example 127 Reading a Dynamic Indexed File
IDENTIFICATION DIVISION.
...
ENVIRONMENT DIVISION.
...
SELECT MASTER-IN
ASSIGN TO "$WOOSTR.BERTIE.MASTER"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS CUSTOMER-NUMBER
FILE STATUS IS MASTER-IN-FILE-STATUS.
...
DATA DIVISION.
READ 415










