READ [FROM] fname ;
Fname is the internal file name of the file to be read.
The READ statement reads the next record from fname in the same manner as the FOR statement. It is permissible to READ a file that is currently being processed with the FOR statement. Any errors that occurred during the read may be found by calling the ERROR function. In addition, the functions EOF or END_OF_FILE may be called to determine if the end of file was reached during the read.
The following code:
WHILE NOT EOF (master) REPEAT BEGIN
is equivalent to:
FOR EACH master