| 
    
   | 
   | 
  
     
    
    
NM and CM callable.
    
Returns access and status information about a file.
    
  | 
 
NOTE: FGETINFO is provided for compatibility with MPE V/E-based
systems only. It is recommended that FFILEINFO be used to access data.
  |   
    Syntax
     
            I16V     CA           U16      U16
  FGETINFO (filenum, formaldesig, foption, aoption
            I16       I16      U16      U16     I16
            lrecsize, devtype, ldevnum, hdaddr, filecode,
            I32      I32  I32        I32       I32        I16
            lrecptr, eof, filelimit, logcount, physcount, blksize,
            U16      I16        I16         CA         I32
            extsize, numextent, userlabels, creatorid, labaddr);
    Parameters
     
  - filenum
 
  16-bit signed integer by value (required)
       
      Passes the file number of the file for which information is requested.  
  - formaldesig
 
  character array (optional)
       
      Returns the actual designator of the file being referenced, in the
      following format:
 
  filename.groupname.accountname
 
      The formaldesig array must be at least 28 bytes in length.
      When the actual designator is returned, unused bytes in the array are
      filled with blanks on the right. A nameless file returns an empty string.
      
      The fully qualified name of the file referenced by filenum
      is returned as the value of this parameter. Only names which can be
      expressed using MPE-only semantics are returned. If the name of the
      object referenced by filenum can not be expressed using
      MPE-name semantics, a CCL condition code is returned. Calling
      FCHECK after this error will return FSERR391.  
  - foption
 
  16-bit unsigned integer by reference (optional)
       
      Returns seven file access characteristics by setting bit groupings as
      follows:
       
      
      
      | Bits | Value/Meaning |  
      
      | 14:2 | Domain:
          
          The file domain searched to locate the file:
          
          
          | 00 | New file |  
          | 01 | Old permanent file |  
          | 10 | Old temporary file |  
          | 11 | Old temporary or permanent file |  
           
          
          The record format extension bit is returned as the
          foption (1:1) bit. Byte stream record format is
          represented as a record format extension of one with a variable
          record format (foption (8:2) bits equal to 01.
          
          Directories, symbolic links, device links, pipes and FIFO's cannot be
          represented by foptions. If the object referenced by
          filenum is one of these types, an error will be
          returned. Use FFILEINFO items 102 through 106 to get this information.
          
          (ASC) Not valid for asynchronous device files; however, these bits
          may have been set if file redirection was anticipated. |  
      |   |  
      | 13:2 | ASCII/Binary:
          
          
           |  
      |   |  
      | 10:3 | Default file designator:
          
          
          | 000 | Actual file designator (same as formal file designator) |  
          | 001 | Actual file designator $STDLIST |  
          | 010 | Actual file designator $NEWPASS |  
          | 011 | Actual file designator $OLDPASS |  
          | 100 | Actual file designator $STDIN |  
          | 101 | Actual file designator $STDINX |  
          | 110 | Actual file designator $NULL |  
           
           |  
      |   |  
      | 8:2 | Record format:
          
          
          | 00 | Fixed-length records |  
          | 01 | Variable-length records |  
          | 10 | Undefined-length records |  
          | 11 | Spoolfile format records |  
           
          
          (ASC) Not valid for asynchronous device files; however,
          "fixed-length" may have been set if file redirection was
          anticipated. |  
      |   |  
      | 7:1 | Carriage control:
          
          
          | 0 | No carriage-control character expected |  
          | 1 | Carriage-control character expected |  
           
           |  
      |   |  
      | 6:1 | MPE/iX tape label:
          
          
          | 0 | Nonlabeled tape |  
          | 1 | Labeled tape |  
           
          
          (ASC) Not valid for asynchronous device files. May have been set if
          file redirection was anticipated. |  
      |   |  
      | 5:1 | Disallow FILE equation:
          
          This option ignores any corresponding FILE command, so the
          specifications in the call to FOPEN/HPFOPEN take effect
          (unless overridden by those in the file label). The following bit
          settings apply:
          
          
          | 1 | Disallow FILE command |  
          | 0 | Allow FILE command |  
           
           |  
      |   |  
      | 2:3 | File type:
          
          
          | 000 | Standard file (STD) |  
          | 001 | KSAM/3000 file |  
          | 010 | Relative I/O file (RIO) |  
          | 011 | KSAM XL file |  
          | 100 | Circular file (CIR) |  
          | 101 | NM spoolfile |  
          | 110 | Message file (MSG) |  
           
          
          (ASC) Set to 000 for asynchronous device files. |  
      |   |  
      | 1:1 | Record format extension:
          
          
          | 0 | Do not use extended record format |  
          | 1 | Use extended record format |  
           
           |  
      |   |  
      | 0:1 | Reserved for the operating system |  
 
     
 
  - aoption
 
  16-bit unsigned integer by reference (optional)
       
      Returns file access information by setting bit groupings in the following
      manner:
       
      
      
      | Bits | Value/Meaning |  
      
      | 12:4 | Access type:
          
          The type of access allowed users of this file:
          
          
          | 0000 | Read only |  
          | 0001 | Write only |  
          | 0010 | Write only (previous data not deleted) |  
          | 0011 | Append only |  
          | 0100 | Read/Write |  
          | 0101 | Update |  
          | 0110 | Execute |  
          | 0111 | Execute-Read |  
          | 1000 | Reserved |  
          | 1001 | Directory read access |  
           
           |  
      |   |  
      | 11:1 | Multirecord:
          
          
          | 0 | Nonmultirecord mode |  
          | 1 | Multirecord mode |  
           
           |  
      |   |  
      | 10:1 | Dynamic locking:
          
          
          | 0 | Disallow dynamic locking/unlocking |  
          | 1 | Allow dynamic locking/unlocking |  
           
           |  
      |   |  
      | 8:2 | Exclusive:
          
          Specifies the access, from the time it is opened to the time it is
          closed:
          
          
          | 00 | Default |  
          | 01 | Exclusive access |  
          | 10 | Semi-Exclusive access |  
          | 11 | Shared access |  
           
           |  
      |   |  
      | 7:1 | Inhibit buffering:
          
          Inhibits automatic buffering by the operataing system and allows I/O
          to take place directly between the stack and the applicable hardware
          device:
          
          
          | 0 | Normal buffering |  
          | 1 | Inhibit buffering |  
           
          
          (ASC) Not valid for asynchronous device files. |  
      |   |  
      | 5:2 | Multiaccess mode:
          
          Provides the accessors with shared access to the file:
          
          
          | 00 | Nonmultiaccess |  
          | 01 | Intrajob multiaccess |  
          | 10 | Interjob multiaccess |  
           
          
          (ASC) Not valid for asynchronous device files. |  
      |   |  
      | 4:1 | Nowait I/O:
          
          Allows the accessors to initiate an I/O request and to have control
          returned before completion of the I/O.
          
          
          | 0 | Nowait I/O not in effect |  
          | 1 | Nowait I/O in effect |  
           
           |  
      |   |  
      | 3:1 | File copy access:
          
          
          | 0 | Access in file's native mode |  
          | 1 | Access as standard sequential file |  
           
           |  
      |   |  
      | 0:3 | Reserved for the operating system. |  
 
     
  - lrecsize
 
  16-bit signed integer by reference (optional)
       
      Returns the logical record size associated with the file:
       
        If the file was created as a binary file, this value is positive
            and expresses the size in half words.  
        If the file was created as an ASCII file, this value is negative
            and expresses the size in bytes.  
       
      For interprocess communication (IPC), when there is a call to
      FCONTROL with controlcode=46, the value
      returned in lrecsize is the size of the data records,
      including the 4-byte header.
      
      Maintained to ensure backward compatibility with MPE V/E-based systems.
      MPE V/E record size limits are imposed when FGETINFO returns
      record size information on all file types (STD, KSAM, RIO, CIR, MSG). If
      the record size of the specified file exceeds MPE V/E limits, a zero is
      returned. Use itemnum 67 of the FFILEINFO
      intrinsic or itemnum 30 of the FLABELINFO
      intrinsic to obtain valid MPE/iX record size data if the record size
      exceeds MPE V/E limits.  
  - devtype
 
  16-bit signed integer by reference (optional)
       
      Returns the type and subtype of the device being used for a KSAM, RIO,
      circular, or message file, or devices such as a tape drive, printer, or
      terminal where bits (0:8) indicate device subtype, and bits (8:8)
      indicate device type. For standard disk files, bits (8:8)=00000011 and
      bits (0:8)=00001000 (indicate a 7933/35 disk drive).
       
      If the file is not spooled or is opened as a spoolfile through the
      logical device, the returned devtype is actual. If an
      output file is spooled and was opened by device class name,
      devtype contains the type and subtype of the first device
      in its class. (This may be different from the device actually used.)  
  - ldevnum
 
  16-bit unsigned integer by reference (optional)
       
      Returns the logical device number (ldev) associated with the device where
      the file label resides:
       
        If the file is a disk file, ldevnum is the
            location of the file label. (File data may reside on the same
            device as the file label.)  
        If the file is spooled, ldevnum is a virtual
            device number that does not correspond to the system configuration
            I/O device list.  
        If the file is located on a remote computer, linked by a DS
            point-to-point or X.25 link, the left eight bits (0:8) are the
            logical device number of the distributed system (DS) device.  
        If the remote computer is linked by NS 3000/XL, the left eight
            bits (0:8) are the remote environment of the connection. The right
            eight bits (8:8) are the LDEV of the device on the remote computer
            where the file label resides.  
        If the DS device for the RFA or the LDEV is 0, then
            ldevnum returns a 0.  
       
       
  - hdaddr
 
  16-bit unsigned integer by reference (optional)
       
      Returns 2048. Maintained to provide backward compatibility with MPE
      V/E-based systems.  
  - filecode
 
  16-bit signed integer by reference (optional)
       
      Returns the file code of a disk file.
       
      (ASC) Not valid for asynchronous device files.  
  - lrecptr
 
  32-bit signed integer by reference (optional)
       
      Returns the current logical record pointer setting. This value is the
      displacement in logical records from record number 0 in the file and
      identifies the record that would be accessed next by an FREAD or
      FWRITE call.
       
      (ASC) Not valid for asynchronous device files.  
  - eof
 
  32-bit signed integer by reference (optional)
       
      Returns the pointer setting of the last logical record currently in the
      file (equivalent to the number of logical records currently in the file).
      If the file does not reside on disk, this value is zero. For interprocess
      communication (IPC), when a call to FCONTROL with
      itemnum=46 is in effect, the number of records returned
      in eof includes open, close, and data ecords.
       
      (ASC) Not valid for asynchronous device files.  
  - filelimit
 
  32-bit signed integer by reference (optional)
       
      Returns a number representing the last logical record that could exist in
      the file (the physical limits of the file). If the file does not reside
      on disk, this value is zero.
       
      (ASC) Not valid for asynchronous device files.  
  - logcount
 
  32-bit signed integer by reference (optional)
       
      Returns the total number of logical records passed to and from the
      program during the current file access.  
  - physcount
 
  32-bit signed integer by reference (optional)
       
      Returns the total number of physical I/O operations performed within the
      process, against the file, since the last FOPEN/HPFOPEN
      call.  
  - blksize
 
  16-bit signed integer by reference (optional)
       
      Returns the file block size:
       
        If the file is binary, the value is positive and the size is in
            half words.  
        If the file is ASCII, the value is negative and the size is in
            bytes.  
       
      Maintained for backward compatibility with MPE V/E-based systems. MPE V/E
      block size limits are imposed when FGETINFO returns block size
      information on all file types (STD, KSAM, RIO, CIR, MSG). If the block
      size of the specified file exceeds MPE V/E limits, 0 is returned. Use
      itemnum=68 of the FFILEINFO intrinsic or
      itemnum=31 of the FLABELINFO intrinsic to get
      valid MPE/iX block size data if the block size exceeds MPE V/E limits.
      
      (ASC) Not valid for asynchronous device files.  
  - extsize
 
  16-bit unsigned integer by reference (optional)
       
      Maintained to provide backward compatibility with MPE V/E-based systems.
       
      (ASC) Not valid for asynchronous device files.  
  - numextent
 
  16-bit signed integer by reference (optional)
       
      Maintained to provide backward compatibility with MPE V/E-based systems.
       
      (ASC) Not valid for asynchronous device files.  
  - userlabels
 
  16-bit signed integer by reference (optional)
       
      Returns the number of user labels defined for the file during creation.
      If the file is not a disk file, this number is zero. When an old file is
      opened for overwrite output, the value of userlabels is
      not reset, and old user labels are not destroyed.
       
      (ASC) Not valid for asynchronous device files.  
  - creatorid
 
  character array (optional)
       
      An unqualified form of the file owner's name is returned as the value of
      this parameter. The file owner is not necessarily the file's creator.
      File ownership may be changed using the :ALTFILE command.
       
      A symbolic zero (ASCII 48 in decimal) is returned as the file owner for
      root directories, accounts, and MPE groups created prior to the POSIX
      release.
       
      If the file is not located in the account in which the file owner is a
      member, a blank file owner name is returned.
       
      (ASC) Not valid for asynchronous device files.  
  - labaddr
 
  32-bit signed integer by reference (optional)
       
      Returns a zero. Maintained for backward compatibility with MPE V/E-based
      systems.
       
      (ASC) Not valid for asynchronous device files.  
 
    Operation Notes
     
    
Returns access and status information about a file located on any device. The
file must be opened by the calling process at the time of the FGETINFO
call.
    Condition Codes
     
    
| CCE (2) | Request granted. |  
| CCG (0) | Not returned. |  
| CCL (1) | Request denied. An error occurred. |  
 
    Related Information
     
    
    
    
     
    
     
   |