Accessing Files Programmer's Guide (32650-90885)

Chapter 14 195
Getting File Information
Retrieving Specific File Information
For a more complete list of items that FINFO supports, type HELP FINFO at your
terminal.
The example below shows the steps you can use to retrieve the following information about
a file:
the fully qualified file designator of the specified file
the name of the file creator
file characteristics, returned in the decimal, hexadecimal, and octal equivalents of the
foptions
format described in the FOPEN intrinsic description located in the MPE/iX
Intrinsics Reference Manual.
the file code, returned in decimal, hexadecimal, and octal equivalents
CALC FINFO ('MYFILE',1)
MYFILE.MYGROUP.MYACCT
CALC FINFO ('MYFILE',4)
SCOTT
CALC FINFO ('MYFILE',-13)
1029, $405, %2005
CALC FINFO ('MYFILE',-9)
0, $0, %0
FFILEINFO
Use this intrinsic to retrieve information about a specified file. The file can be on any
device, but it must be opened by the calling process at the time of the FFILEINFO call. If
you wish to return label information from a file that is not opened, use FLABELINFO
instead. FFILEINFO has one required parameter,
filenum
. This is the file number, which is
returned when you open a file using FOPEN or HPFOPEN. You can specify the information
that you wish to be returned by using up to five
itemnum,item
pairs. Each
itemnum
designates a type of information (for example, logical device number, name of file creator,
or volume ID), which is then returned in the
item
parameter. The
itemnum
s can be
specified in any order.
14 Record size (negative value indicates bytes)
15 Block size
19 EOF marker location
24 Last modified time in format (
hh:mm am/pm
)
-24 Last modified time in format (
hhmmss
)
33 Lockword
Table 14-2. FINFO Options
Specify: FINFO returns: