This command reads a single record from an external file that is currently open into a variable. If the file record is longer than the variable, the record data is truncated.
The record read will be delimited by a newline character in the file. This newline character is used purely as a record delimiter and does not form part of the record.
By default, the file will be rewound when an "End-of-File" status is returned by the READ command. This action may be modified by use of the "AT END GOTO label" clause.
The file is read sequentially.
READ variable FROM fileid {AT END GOTO label} {ON ERROR GOTO err_label}
A character variable into which the next record from the file is read.
The name associated with the file when it was opened.
A label within the current scope of the Script, to which Script execution will branch if the "End-of-File" status is encountered.
A label within the current scope of the Script, to which Script execution will branch if an error occurs.
READ data_record FROM datafile READ data FROM datafile AT END GOTO EXIT_LABEL & ON ERROR GOTO read_error