COBOL Manual for TNS/E Programs (H06.08+, J06.03+)

LOCK
keeps other programs from accessing the record retrieved until an UNLOCKFILE statement,
UNLOCKRECORD statement, or REWRITE UNLOCK statement executes. The file that file-name
specifies must be associated with a disk device.
PROMPT
displays prompt-item to the file before a READ operation (as in a COBOL requester
communicating with a server). The PROMPT phrase is permitted only for files whose organization
is SEQUENTIAL and works only for terminals, processes, operator consoles, and communication
system submanagers. If the PROMPT phrase is specified for other devices, such as disk files, it
is ignored.
prompt-item
is a DISPLAY data item that starts at the beginning of a record of the file associated with
file-name.
prompt-item is ignored if the file against which the READ is executed is open in INPUT,
OUTPUT, or EXTEND mode, or if the file is assigned to a device not capable of supporting
such operations (such as a disk file). For further information on the use of prompt-item, see
Prompt 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 READ
statement causes a run-time error.
imperative-stmt-1
is an imperative statement to be performed when the end of the file is encountered at the
beginning of the read operation. This phrase is required if no USE statement is applicable for
the file. If both a USE statement and an AT END phrase are present, only the AT END phrase
is used.
imperative-stmt-2
is an imperative statement to be performed when the end of the file is not encountered at the
beginning of the read operation.
END-READ
ends the scope of the READ statement, causing the READ to be a delimited-scope statement. If
the READ statement does not end with an END-READ phrase, the presence of the AT END or
the NOT AT END phrase causes the READ statement to be a conditional statement, which ends
at the next period separator.
Usage Considerations:
Restrictions on REVERSED
REVERSED can be specified for a file only if all of these conditions are true:
The file is a structured disk file.
The file’s file-control entry does not have a RESERVE clause with number greater than
two.
The file’s access is not RANDOM.
Prereading is not active for the file.
READ 407