Accessing Files Programmer's Guide (32650-90885)

188 Chapter14
Getting File Information
Displaying General File Information
Displaying General File Information
Some questions that you may wish to answer in this section include
Does a file by this name exist in my account or group?
How large is this file?
When and by whom was this file created?
What security provisions exist for this file?
You can use this information in an interactive context, or you can use commands and
intrinsics within an executing program to obtain and utilize the information.
Displaying permanent file information with LISTFILE
The LISTFILE command is one of the most widely used commands in MPE/iX. You use
LISTFILE to display information about one or more permanent files that you specify.
LISTFILE has parameters that allow you to:
specify a set of permanent or temporary files that you wish information about
specify the amount, or level, of file information that you wish to see
specify a file where the LISTFILE output is written to
Specifying a file reference
If you do not indicate otherwise, LISTFILE displays information about all of the permanent
files located in your logon group. You can optionally reference a file (or files) by specifying a
file name and qualifying it with the appropriate group and/or account name. For example,
if your logon group and account are MYGROUP.MYACCT, the following commands will return
information about the same file:
LISTFILE MYFILE
LISTFILE MYFILE,MYGROUP
LISTFILE MYFILE,MYGROUP,MYACCT
In addition, you can use MPE/iX wildcard characters, in conjunction with a qualified file
reference, to specify a set of files you want LISTFILE to display information about. The
wildcard characters you can use are
@ = zero or more alphanumeric characters
# = a single numeric character
? = a single alphanumeric character
You use: To obtain information about:
LISTFILE Characteristics of a permanent file
LISTFILE...;TEMP Characteristics of a temporary file
LISTEQ File equations in effect for current job or session