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

END-IF
...
READ for Line Sequential Files
READ for line sequential files reads the next record in the file.
file-name
is the file description name of the file to retrieve a record from.
data-name
is the identifier of the data area defined by your program to which the contents of the record
area are transferred after the read operation is complete.
data-name cannot be an index-name or the identifier of an index data item. The transfer is
conducted as if it were a move from an alphanumeric item to an alphanumeric item.
The INTO phrase is allowed only when one of these conditions is true:
Only one record is associated with file-name.
The record associated with file-name is defined as a data structure or as an elementary
alphanumeric item and data-name is either a data structure or an elementary alphanumeric
item.
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.
READ 417