COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-241
START
If neither BEFORE nor AFTER is present, the file-position indicator is set to the
record at the position defined by the values of key and position-key.
position-key
is either the file prime key or a unique alternate key. If position-key is
the file prime key (the prime record key of an indexed or queue file or the
relative key of a relative file), then key must refer to one of:
The prime key
A leftmost subordinate of the prime key
An alternate key
A leftmost subordinate of an alternate key
If position-key is a unique alternate key (a key described without the
DUPLICATES clause), then key must refer to the same alternate key (or
to a leftmost subordinate of that alternate key).
If position-key is a leftmost subordinate of a prime or alternate key,
see GENERIC.
APPROXIMATE
is the default positioning mode. APPROXIMATE means that reading begins at the
first record that satisfies the relationship that the KEY phrase specifies.
Subsequent READ statements read the records in file key order or physical order,
depending on the file’s organization, until the end of the file is reached.
GENERIC
is an alternative positioning mode. If GENERIC is used, then relationship
must be EQUAL, EQUAL TO, or =. Reading begins at the first record that satisfies
the relationship and continues until the relationship is not satisfied (logical end of
file).
GENERIC is usually used with a partial key; that is, a subordinate item of the key
defined for the file. Use of the leftmost subordinate governs the action of the
GENERIC clause, but the complete alternate key is used for positioning (as
explained in START Statement With the POSITION Phrase).
wait-time
is the time interval, in seconds, in which the operation must complete. wait-time
can be a literal or the name of a data item. In either case, it must have a value
described with at most seven digits preceding any decimal point position. Any
fractional portion is truncated to two decimal places.
If file-name was not opened with a TIME LIMITS phrase, including wait-time
in the START statement causes a run-time error.