COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
HP COBOL includes two extensions that are of particular interest if you are writing a server program:
DescriptionPhrase
Lets you position a file at the first record in a subset of a file that consists of all records that satisfy
a certain (EQUALS) key relation. After such a START, you can execute sequential READ statements
GENERIC
(READ NEXT, for dynamic-access mode) to read all records of the subset. When, eventually, a
record does not satisfy the key relation, the run-time routine simulates an at-end condition.
Lets you position a file at a specific point in a set of duplicate values of an alternate key (as
specified in the KEY phrase). The position-key must be a unique value: a prime or relative
POSITION
key or a unique alternate key. By using this feature, a context-free server can return a series of
groups of records to its requester. With each group, it returns the value of the unique key last
used. The requester can then send both the alternate key value for the KEY phrase and the unique
value for the POSITION phrase to the server, to specify where to begin the next group.
file-name
is the file description name of the file to position. It must have an access mode of sequential
or dynamic and be opened for INPUT or I-O but not for HP COBOL Fast I-O.
KEY phrase
must appear if the file has sequential organization or if the file has relative organization but
is not described with a RELATIVE KEY clause. If KEY phrase is omitted, the file’s prime key is
used.
450 Procedure Division Verbs










