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

Interaction of LOCKFILE and READ LOCK Statements
INTO Phrase
GUARDIAN-ERR Special Register
Variable-Length Records
Use of wait-time
Example 129 Reading a Random Indexed File
SELECT MASTER-IN ASSIGN TO "MASTER"
ORGANIZATION IS INDEXED
ACCESS MODE IS DYNAMIC
RECORD KEY IS INVOICE-NUMBER.
...
PROCEDURE DIVISION.
...
MOVE WS-INVOICE-NUMBER TO INVOICE-NUMBER
READ MASTER-IN
INVALID KEY PERFORM RANDOM-READ-ERROR-RTN
END-READ
RELEASE
RELEASE, which must be within a SORT input procedure, sends the next input record to the sorting
process.
record-name
is a record-name in a sort-merge file description (SD) entry.
data-name
is the identifier of the item containing the record to be sent. Before the record is sent, it is moved
to record-name.
For more details and an example, see SORT (page 441).
REPLACE
REPLACE substitutes zero or more words of pseudotext for one or more words of pseudotext. You
can use REPLACE in any division. For more information, see REPLACE Statement (page 508).
RETURN
RETURN, which must be within a SORT or MERGE output procedure, gets the next output record
from the SORT or MERGE.
422 Procedure Division Verbs