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

  1. ACCESS
  2. BLANK
  3. CARRIAGECONTROL
  4. CONVERT
  5. DIRECT
  6. ERR
  7. EXIST
  8. FORM
  9. FORMATTED
  10. IOSTAT
  11. KEYED
  12. NAME
  13. NAMED
  14. NEXTREC
  15. NUMBER
  16. OPENED
  17. ORGANIZATION
  18. RECL
  19. RECORDTYPE
  20. SEQUENTIAL
  21. UNFORMATTED

Top: f77 Up: 13 - Statements
Previous: 13,40,4 - Namelist Next: 13,41,1 - ACCESS