HP 3000 Manuals

CATALOG [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

CATALOG 

The CATALOG statement displays directory information about specified
files.  The format of the directory information displayed depends on the
operating system.

Syntax 

{CATALOG}
{CAT    }[option_list]

Parameters 

option_list      option , [ option ] [, option ]

                 {FILE[=] filename_or_fileset}
option           {TYPE[=] file_code          }
                 {COUNT[=] num_var           }

                 Each option can occur only once in a CATALOG statement.

filename_or_     An fname as described chapter 6 or a set of files
fileset          specified by incorporating "wild card" characters.  This
                 is the set of files that directory information is
                 displayed for.  Wild card characters represent a set of
                 characters and are operating system dependent.  On the
                 HP3000 operating with the MPE XL operating system,
                 information on the use of wild card characters can be
                 obtained by typing ":help listf parms".  For example,
                 the "@" symbol specifies zero or more alphanumeric
                 characters.  Thus, the filename, "ab@" specifies the
                 file "ab" and all additional files that have the "ab"
                 prefix.  If the FILE option is not selected, the default
                 value for a filename_or_fileset is the user's group and
                 account or the group and account specified in the most
                 recent FILES ARE IN statement.

file_code        A string expression of up to five characters in length
                 specifying the type of file and indicated by a file
                 code.  If the TYPE option is selected, then directory
                 information is displayed about only those files with the
                 designated file_code.  The values of file-code available
                 to the user are operating system dependent.  The values
                 for MPE XL are available in the MPE XL Commands 
                 Reference Manual under the BUILD command's file code
                 mnemonics.  Valid values include "BSVXL", "BDTXL", "JL",
                 or "1200".  If the TYPE option is not specified, then
                 TYPE information is not used as a selection criteria for
                 determining which file's directory information is
                 displayed.

num_var          A numeric variable to which the total number of files
                 found is returned.

The CATALOG statement lists its information on the standard list device
or on the device specified by the most recently executed SEND SYSTEM
OUTPUT TO statement.  Table 4-1 shows how specifying file_code or fname,
both, or neither, determines CATALOG statement output on the HP 3000.

          Table 4-1.  CATALOG Statement Output 

--------------------------------------------------------------------------------------------
|                                    |                                                     |
|   FILE and TYPE option selected    |               Files That the CATALOG                |
|                                    |              Statement Lists Directory              |
|                                    |                   Information For                   |
|                                    |                                                     |
--------------------------------------------------------------------------------------------
|                                    |                                                     |
| Neither                            | All files.                                          |
|                                    |                                                     |
--------------------------------------------------------------------------------------------
|                                    |                                                     |
| TYPE only                          | Files that have an MPE file code matching           |
|                                    | file_code.                                          |
|                                    |                                                     |
--------------------------------------------------------------------------------------------
|                                    |                                                     |
| FILE only                          | Files that match the filename_or_fileset            |
|                                    | specification.                                      |
|                                    |                                                     |
--------------------------------------------------------------------------------------------
|                                    |                                                     |
| FILE and TYPE                      | Files that match the filename_or_fileset            |
|                                    | specification that also have the MPE file code      |
|                                    | matching file_code.                                 |
|                                    |                                                     |
--------------------------------------------------------------------------------------------

Examples 

         CAT
         CAT file1
         CAT FILE ="File1"
         CAT TYPE = "BDTXL"

     10  CAT FILE ="@BB@",TYPE="BSVXL",COUNT=Count
     20  CAT FILE ="@.PUB.SYS",COUNT=System_count



MPE/iX 5.0 Documentation