The INQUIRE statement requests information about specified properties of a file or of a logical unit on which a file might be opened. It takes one of the following forms:
INQUIRE (FILE=fi [,DEFAULTFILE=dfi . . .], flist)
INQUIRE ([UNIT=]u, flist)
FILE=fi and UNIT=u can appear anywhere in the property-specifier
list; however, if the UNIT keyword is omitted, the unit
specifier u must be the first parameter in the list.
When inquiring by file, you can specify DEFAULTFILE=dfi in addition
to or in place of FILE=fi. If a file is opened with both FILE and
DEFAULTFILE keywords specified in the OPEN statement, then you can
inquire about this file by specifying both the FILE and DEFAULTFILE
keywords in the INQUIRE statement.
An INQUIRE statement can be executed before, during, or after the connection of a file to a unit. The values assigned by the statement are those that are current when the INQUIRE statement executes.
To get file characteristics, specify the INQUIRE statement before opening the file. (File characteristics are stored in the file header.)