HPlogo Accessing Files Programmer's Guide: HP 3000 MPE/iX Computer Systems > Chapter 14 Getting File Information

Displaying General File Information

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

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.

You use:To obtain information about:
LISTFILECharacteristics of a permanent file
LISTFILE...;TEMPCharacteristics of a temporary file
LISTEQFile equations in effect for current job or session

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

Specifying the list level

If you do not indicate otherwise, LISTFILE displays only the unqualified file name. You can optionally direct LISTFILE to display more detailed information about the file(s) that you specify, depending upon the parameter value that you specify in the command, as listed in Table 14-1 “Format Selection”.

Table 14-1 Format Selection

OptionNameDisplayed Information
-2ACDDisplays the file's ACD (access control definition). System managers can view the ACD for any file. Account managers can view the ACD for files in that account. File creators can view the ACD for their files. Other users can view an ACD only if that ACD specifies that the user has RACD (read ACD) access.
-1LABELDisplays the hexadecimal listing of the file label, including all lockwords. This level is available only to system managers and account managers.
0FILESShows only the file name. This is the default.
1SUMMARYDisplays the file name, file code, record size, record format, and other file characteristics such as ASCII or binary records, carriage-control option, current end-of-file location, and the maximum number of records allowed in the file.
2DISCDisplays the file name, file code, record size, record format, and other file characteristics such as ASCII or binary records, carriage-control option, current end-of-file location, and the maximum number of records allowed in the file. It also displays the blocking factor, number of sectors in use, number of extents currently allocated, and the maximum number of extents allowed. LISTF, 2 also displays KSAM XL file types with "K".
3DETAILDisplays the file name, record size, extent size, number of records, access rights for the user, and other file characteristics including the date created, modified, and last accessed. The creator, lockword, and label address are omitted. These can be obtained by specifying -3 if you have AM capability (for files in your account) or SM capability (for any file on the system).
4SECURITYDisplays the security matrix for the file. This includes account-, group- and file-level security and the access rights for the user. If an access control definition exists (ACD), a message stating that fact is displayed.
5DATAShows LISTFILE,3 data and all file-specific data in LISTF, 3 type format (that is, KSAM and SPOOL).
6QUALIFYShows only fully qualified file name.
7UNIQUEShows all file specific data in LISTFILE,3 type format, but does not show LISTFILE,3 data.

 

Specifying an alternate output file

If you do not indicate otherwise, LISTFILE sends its output to $STDLIST. You can optionally specify a different output file to which the file descriptions are written.

LISTFILE examples

  1. List all files in your logon account and group with file names that contain the characters "INFO":

       LISTFILE @INFO@
    
    
    
       INFOABST  INFOUTLN  INFOPREF  PSMGINFO  WINFOUTQ  XLINFO 
    
  2. Show the file characteristics of all files with names beginning with "X" in a specified account and group:

       LISTFILE X@.INTRIN.LOZAR
    
    
    
       ACCOUNT=  LOZAR          GROUP=    INTRIN 
    
    
    
       FILENAME    CODE ------------LOGICAL RECORD--- ----SPACE---- 
    
    
    
                   SIZE  TYP     EOF    LIMIT R/B   SECTORS -X  MX 
    
       XLHPCICO     80B   FA      39      39    3       8    1   1 
    
       XLHPCIDE     80B   FA      47      47    3       8    1   1 
    
       XLHPCIGE     80B   FA      27      27    3       8    1   1 
    
       XLHPCIPU     80B   FA      44      44    3       8    1   1 
    
  3. Display the label information for a specified file:

       LISTFILE ODDITY,3
    
    
    
       ********************
    
       FILE: ODDITY.INFO.LOZAR 
    
    
    
       FILE CODE : 1030      FOPTIONS: BINARY,FIXED,NOCCTL,STD 
    
       BLK FACTOR: 1         CREATOR :  
    
       REC SIZE: 256(BYTES)  LOCKWORD:  
    
       BLK SIZE: 256(BYTES)  SECURITY--READ    : ANY 
    
       EXT SIZE: 0(SECT)               WRITE   : ANY 
    
       NUM REC: 7816                   APPEND  : ANY 
    
       NUM SEC: 0                      LOCK    : ANY 
    
       NUM EXT: 4                      EXECUTE : ANY 
    
       MAX REC: 31250                **SECURITY IS ON 
    
                             FLAGS   : n/a 
    
       NUM LABELS: 0         CREATED : TUE, JUN  3, 1986, 9:47 AM 
    
       MAX LABELS: 0         MODIFIED: TUE, JUN  3, 1986, 9:48 AM 
    
       DISC DEV -: 0         ACCESSED: WED, JUN  4, 1986, 2:38 PM 
    
       CLASS     : DISC      LABEL ADDR: $00000010 $00004414 
    
       SEC OFFSET: 0 
    
  4. Obtain a detailed ACD report on a file:

       LISTFILE FILEA,-2
    
    
    
       FILE = FILEA      ************** ACD ENTRIES **************
    
    
    
                         SAM.DOE            : R
    
                         JOE.DOE            : W
    
                         @.DESIGN           : NONE
    
                         @.@                : X
    

Displaying temporary file information with LISTFILE...(;TEMP)

The LISTFILE...(;TEMP) command is similar to LISTFILE, except that it displays information about the specified temporary files. Syntax, parameters, and information displayed are the same as LISTFILE, with the following exceptions:

Its display of file information includes the word TEMPORARY or the abbreviation TEMP.

Displaying file equations with LISTEQ

The LISTEQ command allows you to list all file equations in effect for the job or session from which you issue the command. Here is an example of a LISTEQ call:

   LISTEQ





   FILE EQUATIONS 



   FILE LP;DEV=PP;ENV=ELITE.XQENV.SYS;CCTL 

   FILE OFFLINE;DEV=PP;ENV=ELITE.XQENV.SYS;CCTL 

   FILE EDTLIST;DEV=PP;ENV=ELITE.ENV2680.SYS 

If you do not indicate otherwise, LISTEQ sends its output to $STDLIST. You can optionally specify a different output file to which the file descriptions are written. For example, the following command sends output to the temporary file MYFILE:

   LISTEQ MYFILE
Feedback to webmaster