- 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:
Table 10-11 Title not available (INQUIRE)
| 'SEQUENTIAL' | File
is connected for sequential access. |
| 'DIRECT' | File is connected for direct access. |
| 'UNDEFINED' | File is not connected. |
- ACTION=character-variable
returns the
following values, indicating the direction of the transfer:
Table 10-12 Title not available (INQUIRE)
| 'READ' | File
is connected for reading only. |
| 'WRITE' | File is connected for writing only. |
| 'READWRITE' | File is connected for reading and
writing. |
| 'UNDEFINED' | File is not connected. |
- 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:
Table 10-13 Title not available (INQUIRE)
| 'NULL' | Null
blank control is in effect. |
| 'ZERO' | Zero blank control is in effect. |
| 'UNDEFINED' | File is not connected for formatted I/O. |
- DELIM=character-variable
returns the
following values, indicating the character to use (if any) to delimit
character values in list-directed and namelist formatting:
Table 10-14 Title not available (INQUIRE)
| 'APOSTROPHE' | An
apostrophe is used as the delimiter. |
| 'QUOTE' | The double quotation mark is used
as the delimiter. |
| 'NONE' | There is no delimiting character. |
| 'UNDEFINED' | File is not connected for formatted I/O. |
- DIRECT=character-variable
returns
the following values, indicating whether or not the file is connected for
direct access:
Table 10-15 Title not available (INQUIRE)
| 'YES' | File
is connected for direct access. |
| 'NO' | File is not connected for
direct access. |
| 'UNKNOWN' | It cannot be determined whether or not 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:
Table 10-16 Title not available (INQUIRE)
| 'TRUE' | File
exists or unit is connected. |
| 'FALSE' | File does not exist or unit is not connected. |
- 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:
Table 10-17 Title not available (INQUIRE)
| 'FORMATTED' | File
is connected for formatted I/O. |
| 'UNFORMATTED' | File is connected for unformatted
I/O. |
| 'UNDEFINED' | File is not connected. |
- FORMATTED=character-variable
returns the
following values, indicating whether or not the file is connected for
formatted I/O:
Table 10-18 Title not available (INQUIRE)
| 'YES' | File
is connected for formatted I/O. |
| 'NO' | File is not connected for formatted
I/O. |
| 'UNKNOWN' | It cannot be determined whether or not 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:
Table 10-19 Title not available (INQUIRE)
| 'TRUE' | File
has a name. |
| 'FALSE' | File does not have 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):
Table 10-20 Title not available (INQUIRE)
| 'TRUE' | File
is connected. |
| 'FALSE' | File is not 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:
Table 10-21 Title not available (INQUIRE)
| 'YES' | File
or unit is connected with PAD='YES' in OPEN statement. |
| 'NO' | File or unit is connected with PAD='NO' in OPEN statement. |
- POSITION=character-variable
returns the
following values, indicating the file position:
Table 10-22 Title not available (INQUIRE)
| 'REWIND' | File
is connected with its position at the start of the first record. |
| 'APPEND' | File is connected with its position
at the end-of-file record. |
| 'ASIS' | File is connected without changing
its position. |
| 'UNDEFINED' | File is not connected or is connected for direct
access. |
- READ=character-variable
returns the
following values, indicating whether or not reading is an allowed
action for the file:
Table 10-23 Title not available (INQUIRE)
| 'YES' | Reading
is allowed for file. |
| 'NO' | Reading is not allowed for file. |
| 'UNKNOWN' | It cannot be determined whether or not reading
is allowed for file. |
- READWRITE=character-variable
returns the
following values, indicating whether or not reading and writing are
allowed actions for the file:
Table 10-24 Title not available (INQUIRE)
| 'YES' | Both
reading and writing are allowed for file. |
| 'NO' | Reading and writing are not both
allowed for file. |
| 'UNKNOWN' | It cannot be determined whether or not reading
and writing are both allowed for 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:
Table 10-25 Title not available (INQUIRE)
| 'YES' | File
is connected for sequential access. |
| 'NO' | File is not connected for sequential
access. |
| 'UNKNOWN' | It cannot be determined whether or not file
is connected for sequential access. |
- UNFORMATTED=character-variable
returns the
following values, indicating whether or not the file is connected for
formatted I/O:
Table 10-26 Title not available (INQUIRE)
| 'YES' | File
is connected for unformatted I/O. |
| 'NO' | File is not connected for unformatted
I/O. |
| 'UNKNOWN' | It cannot be determined whether or not file
is connected for unformatted I/O. |
- WRITE=character-variable
returns the
following values, indicating whether or not writing is an allowed action
for the file:
Table 10-27 Title not available (INQUIRE)
| 'YES' | Writing
is allowed for file. |
| 'NO' | Writing is not allowed for file. |
| 'UNKNOWN' | It cannot be determined whether or not writing
is allowed for file. |