Developer Guide and Reference

ID 767251
Date 10/31/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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]

io-keyword

Is one of the following: ACCEPT, PRINT (or TYPE), READ, REWRITE, or WRITE.

io-control-list

Is one or more of the following input/output (I/O) control specifiers:

ADVANCE

EOR

[NML=]group

SIZE

ASYNCHRONOUS

ERR

PAD

[UNIT=]io-unit

BLANK

[FMT=]format

POS

 

DECIMAL

ID

REC

 

DELIM

IOMSG

ROUND

 

format

Is the nonkeyword form of a control-list format specifier (no FMT=).

group

Is the nonkeyword form of a control-list namelist specifier (no NML=).

io-list

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.

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 a position specifier (POS=) is present, the data transfer statement is a stream-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 Branch Specifiers.)

The following sections describe the I/O control list and I/O lists.