Input/Output |
The list of control information specifiers is:
[UNIT =] unit [FMT =] f REC = recno IOSTAT = stname ERR = stl
END = stl
U nit specifier Format specifier Record number specifier I/O status specifier Error specifier
6.3.1.1 Control Information List
The control information list must contain a unit specifier. If the second form of the READ statement shown above is used (that is, if no unit is specified), the unit read is the default unit.
The
The following sections 6.3.1.1.1 through 6.3.1.1.6 describe control list specifiers in detail.
6.3.1.1.1Unit Specifier. The unit specifier has the same interpretation as for the OPEN statement (section 6.2.1.1). In addition, for
The unit specifier may also point to an internal file (that is, 'unit' may be the name of a character variable, character array, or character array element name). In this case,
If the optional 'UNIT ='is omitted, the unit specifier must be the first item in 'ctl- list.'
Example:
READ (2) PNAME, AB, HITS
6.3.1.1.2Format Specifier. If
The format of this specifier is
[FMT =]f
where 'f' is one of the following:
•The label of a FORMAT statement in the same program unit as the READ;
•An integer variable ASSIGNed the label of a FORMAT statement;
•A character array name, character variable name, or character expression containing a format specification;
•An asterisk (*) specifying
•An integer, real, or logical array containing a format specification as Hollerith data.
If the optional 'FMT ='is omitted, the format specifier must be the second item in