COBOL Manual for TNS and TNS/R Programs

Data Fundamentals
HP COBOL Manual for TNS and TNS/R Programs522555-006
4-9
Files
Relative Program can select
records in increasing
order of relative
record number
(ignoring empty
record areas).
*
Relative record
numbers begin at 1.
Program can select
records from
anywhere in the file
by specifying relative
record numbers.
Records need not
exist or have
contiguous record
numbers.
*
Program can select
records sequentially
(with READ NEXT
statements) or
randomly (with
READ statements).
*
Indexed Program can select
records in increasing
order of prime or
alternate record key
value (record keys
are fields within
each record). If
records with
duplicate alternate
key values exist, the
order of retrieval is
either by prime key
or by date of entry.
To specify that
retrieval order is by
date of entry, set a
file attribute with
FUP.
*
Program can select
records from
anywhere in the file.*
Program can select
records sequentially
(with READ NEXT
statements) or
randomly (with
READ statements).*
Queue Program can select
records in increasing
order of prime
record key value
(record keys are
fields within each
record). To specify
that retrieval order is
by date of entry, set
a file attribute with
FUP.
Program can select
records from
anywhere in the file.
Program can select
records sequentially
(with READ NEXT
statements) or
randomly (with
READ statements).
Table 4-3. Relationship Between File Organization and Access
Mode (page 2 of 2)
File Organization
Access Mode
Sequential Random Dynamic
* If the file is in Tandem reference format and has alternate keys, this characteristic also applies to the alternate
keys. For a description of Tandem reference format, see Reference Format for Source Program Lines
.