COBOL Manual for TNS and TNS/R Programs
Environment Division
HP COBOL Manual for TNS and TNS/R Programs—522555-006
6-50
FILE-CONTROL Paragraph
SEQUENTIAL
makes the access mode of the file sequential (the default). That means the
records of the file are to be operated upon as if they were sequentially
organized.
RANDOM
makes the access mode of the file random. That means the records of the file
are to be operated upon in any order, as selected by the current value of the
record key or of an alternate key. The default access mode is sequential.
DYNAMIC
makes the access mode of the file dynamic. That means the records of the file
are accessible by either sequential or random access; you can position the file
with START to a certain key value and read or write sequentially from there.
The default access mode is sequential.
RECORD KEY clause
rec-key
is an alphanumeric or unsigned numeric data item defined in the record
description entry for the file. It is the prime key for accessing records within the
file. If the file was created with FUP or CREATE, the reckey size and location
must agree with the size and location of the prime key established by FUP or
CREATE.
All records in the file are ranked in ascending order of the reckey value,
which must be unique for each record.
ALTERNATE RECORD KEY clause
makes alt-key an alternate record key.
RECORD
KEY IS
reckey
VST054.vsd
RECORD
KEY
IS
alt-key
WITH
DUPLICATES
ALTERNATE
VST045.vsd