7.2.2.1 Formatted Direct Access READ Statement

The formatted direct access READ statement performs the following operations:

If the I/O list and formatting do not use all of the characters in a record, the remainder of the record is discarded. If the I/O list and formatting require more characters than are contained in the record, the remaining fields are read as spaces.

Example

In the following example, the READ and FORMAT statements read the first 10 fields from record 35 in the file connected to logical unit 2, translate the values to binary form, and then assign the translated values to the internal storage locations of the 10 elements of the array NUM.

      READ (2,REC=35,FMT=10) (NUM(K),  K=1,10)
10    FORMAT (10I2)


Previous Page Next Page Table of Contents