Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

I/O Control List

The Input/Output (I/O) control list specifies one or more of the following:

  • The I/O unit to act upon ([UNIT=]io-unit)

    This specifier must be present; the rest are optional.

The following table summarizes details about the I/O control list specifiers and it contains links to their descriptions:

Specifier

Values

Function

ADVANCE

'YES'

'NO'

Determines whether non-advancing or advancing I/O occurs.

ASYNCHRONOUS

'YES'

'NO'

Determines whether asynchronous I/O occurs.

BLANK

'NULL'

'ZERO

Determines blank interpretation.

DECIMAL

'COMMA'

'POINT'

Determines decimal symbol interpretation.

DELIM

'APOSTROPHE'

'QUOTE'

'NONE'

Determines delimiters for character constants.

END

A branch statement label

Indicates the statement where execution control transfers to if an end-of-file condition occurs.

EOR

A branch statement label

Indicates the statement where execution control transfers to if an end-of-record condition occurs.

ERR

A branch statement label

Indicates the statement where execution control transfers to if an error condition occurs.

FMT

A format statement label or character expression

Indicates the format of a formatted I/O statement.

ID

An integer variable

Identifies a data transfer statement.

IOMSG

A scalar character variable

Indicates a variable to contain an informative message if an error occurs.

IOSTAT

A scalar integer variable

Indicates a variable to contain the completion status of an I/O operation.

NML

A namelist group name

Identifies a group of data for the data transfer.

PAD

'YES'

'NO'

Determines whether blank padding occurs.

POS

An integer expression

Indicates the file position in stream I/O.

REC

An integer expression

Indicates the record number for direct access.

ROUND

'UP'

'DOWN'

'NEAREST'

'ZERO'

'COMPATIBLE'

'PROCESSOR_DEFINED'

Indicates the rounding mode.

SIGN

'PLUS'

'SUPRESS'

'PROCESSOR_DEFINED'

Indicates the sign mode.

SIZE

A scalar integer variable

Indicates the number of characters transferred from a file in formatted input.

No control specifier can appear more than once, and the list must not contain both a format specifier and namelist group name specifier.

Control specifiers can take any of the following forms:

  • Keyword form

    When the keyword form (for example, UNIT=io-unit) is used for all control-list specifiers in an I/O statement, the specifiers can appear in any order.

  • Nonkeyword form

    When the nonkeyword form (for example, io-unit) is used for all control-list specifiers in an I/O statement, the io-unit specifier must be the first item in the control list. If a format specifier or namelist group name specifier is used, it must immediately follow the io-unit specifier.

  • Mixed form

    When a mix of keyword and nonkeyword forms is used for control-list specifiers in an I/O statement, the nonkeyword values must appear first. Once a keyword form of a specifier is used, all specifiers to the right must also be keyword forms.