READ Statement

The READ statement makes a record available to the program:
When the READ statement is executed, the associated file must be open in INPUT or I-O mode. Execution of the READ statement depends on the file organization. File organization can be:
The READ statement has five formats:

If the FILE STATUS clause is specified in the file-control entry, the associated status key is updated when the READ statement is processed.

Following the unsuccessful processing of any READ statement, the contents of the associated record area and the position of the file position indicator are undefined.

Related Information: