- integer-variable
is the length of the unformatted record that would
result from writing output-list to a
direct-access file. The value returned in integer-variable
can be used with the RECL=
specifier in an OPEN
statement to specify the length of each record in an unformatted
direct-access file that will hold the data in output-list.
- output-list
is a comma-separated list of data items, similar
to what would be included with the WRITE
or PRINT statement.
The data items can include variables and implied-DO
lists (see “Implied-DO loop”).
- io-specifier-list
is a list of comma-separated I/O specifiers.
As noted in the following descriptions, most of the specifiers return
information about the specified unit or file. io-specifier-list
must include either the UNIT=
or FILE= specifier,
but not both. The following paragraphs describe all the I/O
specifiers that can appear in io-specifier-list:
- [UNIT=]unit
specifies the unit connected to an external file.
unit must be an integer expression that
evaluates to a number greater than 0. If the optional keyword UNIT=
is omitted, unit must be the first item
in io-specifier-list. If unit
appears in io-specifier-list, the FILE=
specifier must not be used.
- ACCESS=character
returns the following values, indicating the method
of access:
- ACTION=character-variable
returns the following values, indicating the direction
of the transfer:
- BLANK=character-variable
returns the type of blank control that is in effect.
For information about blank control, see the BLANK=
specifier for the OPEN
statement. The values returned by the BLANK=
specifier are:
- DELIM=character-variable
returns the following values, indicating the character
to use (if any) to delimit character values in list-directed and
namelist formatting:
- DIRECT=character-variable
returns the following values, indicating whether
or not the file is connected for direct access:
- ERR=stmt-label
specifies the label of the executable statement
to which control passes if an error occurs during statement execution.
- EXIST=logical-variable
returns the following values, indicating whether
or not the file or unit exists:
- FILE=character-expression
specifies the name of a file for inquiry. The file
does not have to be connected or even exist. If the FILE=
specifier appears in io-specifier-list,
the UNIT= specifier
must not be used.
- FORM=character-variable
returns the following values, indicating whether
the file is connected for formatted or unformatted I/O:
- FORMATTED=character-variable
returns the following values, indicating whether
or not the file is connected for formatted I/O:
- IOSTAT=integer-variable
returns the I/O status after the statement
executes. If the statement successfully executes, integer-variable
is set to zero. If an error occurs, it is set to a positive integer
that indicates which error occurred..
- NAME=character-variable
returns the name of file connected to the specified
unit. If the file has no name or is not connected, NAME=
returns the string UNDEFINED.
- NAMED=logical-variable
returns the following values, indicating whether
or not the file has a name:
- NEXTREC=integer-variable
returns the number of the next record to be read
or written in a file connected for direct access. The value is the
last record read or written +1. A value of 1 indicates
that no records have been processed. If the file is not connected
or it is a device file or its status cannot be determined, integer-variable
is undefined.
- NUMBER=integer-variable
returns the unit number that is connected to the
specified file. If no unit is connected to the named file, integer-variable
is undefined.
- OPENED=logical-variable
returns the following values, indicating whether
or not the file has been opened (that is, is connected):
- PAD=character-variable
returns a value indicating whether or not input
records are padded with blanks. For more information about padding,
see the PAD=
specifier for the OPEN
statement. The return values are:
- POSITION=character-variable
returns the following values, indicating the file
position:
- READ=character-variable
returns the following values, indicating whether
or not reading is an allowed action for the file:
- READWRITE=character-variable
returns the following values, indicating whether
or not reading and writing are allowed actions for the file:
- RECL=integer-variable
returns the record length of the specified unit
or file, measured in bytes. The file must be a direct-access file.
If the file is not a direct-access file or does not exist, integer-variable
is undefined.
- SEQUENTIAL=character-variable
returns the following values, indicating whether
or not the file is connected for direct access:
- UNFORMATTED=character-variable
returns the following values, indicating whether
or not the file is connected for formatted I/O:
- WRITE=character-variable
returns the following values, indicating whether
or not writing is an allowed action for the file: