Developer Guide and Reference

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

Advance Specifier (ADVANCE=)

The advance specifier determines whether nonadvancing I/O occurs for a data transfer statement. It takes the following form:

ADVANCE=c-expr

c-expr

Is a scalar character expression that evaluates to 'YES' for advancing I/O or 'NO' for nonadvancing I/O. The default value is 'YES'.

Trailing blanks in the expression are ignored. The values specified are without regard to case.

The ADVANCE specifier can appear only in a formatted, sequential data transfer statement that specifies an external unit. It must not be specified for list-directed or namelist data transfer, a child I/O statement, for a data transfer statement within a DO CONCURRENT block, nor for a data transfer statement within a DO CONCURRENT block. An ADVANCE specifier must appear if an EOR specifier appears, and c-expr must have the value 'NO'.

Advancing I/O always positions a file at the end of a record, unless an error condition occurs. Nonadvancing I/O can position a file at a character position within the current record.