Accessing Files Programmer's Guide (32650-90885)

194 Chapter14
Getting File Information
Retrieving Specific File Information
Retrieving Specific File Information
The LISTFILE, LISTFILE...;TEMP and LISTEQ commands return formatted information to
your job or session list device. If you need to retrieve specific information about a
particular file, and you wish to place it in a variable available either to your CI or to your
program, then you'll be interested in the the CI evaluator function and intrinsics described
below.
[:CMD] FINFO
You can use the FINFO evaluator function interactively to retrieve information about a
specified file. FINFO is a function of the expression evaluator, a system procedure used by
the IF, WHILE, SETVAR, and CALC commands of the command interpreter.
FINFO has two parameters. The first is the file name of the file about which you wish to
obtain information; this is a string, and must be either a fully or partially qualified file
name, or a FILE equation backreference. The second parameter is an integer or integer
expression that indicates the nature of the information required. The options available are
listed in Table 14-2. on page 194
You use: To obtain information about:
[CMD]FINFO,FFILEINFO,FGETINFO Characteristics of a currently opened file
FLABELINFO Characteristics of a disk file (opened or not)
FRELATE Whether files are interactive and/or duplicative
Table 14-2. FINFO Options
Specify: FINFO returns:
0 True if rhw file exists; False if it does not
1 Fully qualified file designator
4 Name of file creator
6 Date of file creation in format (
day,mmm,dd,yyyy
)
-6 Date of file creation in format (
yyyymmdd
)
8 Date of last modification in format (
day,mmm,dd,yyyy
)
-8 Date of last modification in format (
yyyymmdd
)
9 File code mnemonic or file code as string
-9 File code as integer
12 File limit
13 FOPTIONS (same format as LISTFILE -3)
-13 FOPTIONS