10.2 Components of Data Transfer Statements

Data transfer statements take one of the following forms:

  io-keyword (io-control-list) [io-list]
  io-keyword format [, io-list]
Is one of the following: ACCEPT, PRINT (or TYPE), READ, REWRITE, or WRITE.
Is one or more of the following input/output (I/O) control specifiers:

[UNIT=]io-unit  ADVANCE  ERR  KEYID (VMS only) 
[FMT=]format  END  IOSTAT  REC 
[NML=]group  EOR  KEY[con] (VMS only)  SIZE 

Is an I/O list, which can contain variables (except for assumed-size arrays) or implied-do lists. Output statements can contain constants or expressions.
Is the nonkeyword form of a control-list format specifier (no FMT=).

If a format specifier ([FMT=]format) or namelist specifier ([NML=]group) is present, the data transfer statement is called a formatted I/O statement; otherwise, it is an unformatted I/O statement.

If a record specifier (REC) is present, the data transfer statement is a direct-access I/O statement; otherwise, it is a sequential- access I/O statement.

If an error, end-of-record, or end-of-file condition occurs during data transfer, file positioning and execution are affected, and certain control-list specifiers (if present) become defined. (For more information, see Section

Section 10.2.1 describes the I/O control list and Section 10.2.2 describes I/O lists.

Previous Page Next Page Table of Contents