Top: f77 Up: 13 - Statements
Previous: 13,40,4 - Namelist Next: 13,41,1 - ACCESS
Section 13,41: INQUIRE
Returns information about specified properties of a file or of a
logical unit on which a file might be opened. The unit need not
exist, nor need it be connected to a file. If the unit is
connected to a file, the inquiry encompasses both the connection
and the file. Statement format:
INQUIRE (FILE=fi [,DEFAULTFILE=dfi...], flist)
INQUIRE ([UNIT=]u,flist)
fi Is a character expression, numeric scalar memory
reference, or numeric array name reference whose
value specifies the name of the file to be
inquired about. (This file name can start with a
tilde (~) on U*X systems.)
dfi Is a character expression specifying a default file
pathname (or file specification) string. (This file
name can start with a tilde (~) on U*X systems.)
flist Is a list of property specifiers in which any one
specifier appears only once. Information about the
individual specifiers is available under the
subtopic headings listed at the end of this Help
topic.
u Is an integer variable or constant specifying the
logical unit number of the file, optionally prefaced
by UNIT=. UNIT= is required if unit is not the
first I/O specifier. The unit does not have to
exist, nor does it need to be connected to a file.
If the unit is connected to a file, the inquiry
encompasses both the connection and the file.
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 open 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 may 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.
You can use INQUIRE to get file characteristics after opening a
file.
Sub-Topics
- ACCESS
- BLANK
- CARRIAGECONTROL
- CONVERT
- DIRECT
- ERR
- EXIST
- FORM
- FORMATTED
- IOSTAT
- KEYED
- NAME
- NAMED
- NEXTREC
- NUMBER
- OPENED
- ORGANIZATION
- RECL
- RECORDTYPE
- SEQUENTIAL
- UNFORMATTED
Top: f77 Up: 13 - Statements
Previous: 13,40,4 - Namelist Next: 13,41,1 - ACCESS