CATALOG

#### Search Results

Search

# CATALOG

File | 8
Statement | `FIND`
Task | This view displays the catalog information of a specified file.

## Fields

Dictionary Field Name | F/L | Mu | DE | Remarks
--- | --- | --- | --- | ---
`ERROR-CODE` | N3 |  |  |
`ERROR-TEXT` | A58 |  |  |
`NODE` | N5 |  | D |
`NODE-NAME` | A16 |  | D |
`SYSTEM-MESSAGE-CODE` | A10 |  |  |
`DSNAME` | A54 |  | D | Required
`VOLSER` | A6 |  | D |
`TYPE` | A8 |  | D |
Dictionary Field Name | F/L | Mu | DE | Remarks
`DEVICE` | B4 |  |  |
`FILE-SYSTEM` | A3 |  | D |
`PREFIX` | A3 |  | D |
`SERIES` | A8 |  | D |
Dictionary Field Name | F/L | Mu | DE |
`CLASS` | A4 |  | D |
`NUMBER-OF-VOLUMES` | N3 |  |  |
`OPTION` | A8 |  | D
`USER-CATALOG` | A44 |  | D
`VOLUME-SEQUENCE` | N3 |  |

## Relevant Error Codes

Code | Text
--- | ---
562 | Catalog entry not found.
566 | Syntax error in catalog name.
567 | Invalid `OPTION`, specify `LONG` or `USERCAT`
786 | Unable to obtain / release storage for CSI work area.
787 | CSI request failed, Module :1:, Reason :2:, RC :3:
788 | Unable to substitute :1:, RC :2:
789 | Unable to get UCB copy for :1:, RC :2:

## Field Descriptions

Field Name | Format/Length
--- | ---
`CLASS` | (A4)

Device class (for example, `DASD`).

Field Name | Format/Length
--- | ---
`DEVICE` | (B4)

The internal `UCBTYP` device code which identifies the device type on which the dataset resides.

Field Name | Format/Length
--- | ---
`DSNAME` | (A54)

Dataset name or dataset name prefix.

If the value specified is a prefix, information on all datasets with that prefix (including `DSNAME` itself) is retrieved (see the field `PREFIX`),

As an extension to the search criteria described in Search Criteria with the FIND Statement in Section Getting Started, a double asterisk (**) may be used to represent zero or more qualifiers, whereas a single asterisk is used to specify either a qualifier or one or more characters within a qualifier. A double asterisk cannot precede or follow any characters; it must be preceded or followed by either a period or a blank.

Note
Dataset names are returned in the order of their corresponding catalog records, i.e. not necessarily in ascending order.

Field Name | Format/Length
--- | ---
`FILE-SYSTEM` | (A3)

Indicates if the catalog entry describes a z/OS UNIX file system data set (HFS or #). Possible values:

blank | Not a file system data set.
`HFS` | HFS data set.
`zFS` | zFS data set.

Field Name | Format/Length
--- | ---
`NUMBER-OF-VOLUMES` | (N3)

Number of volumes of dataset.

Field Name | Format/Length
--- | ---
`OPTION` | (A8)

Possible options:

Option | Explanation
--- | ---
`LONG` | Scan entire catalog. This is required if a file name value such as `*MACLIB*` is specified. The catalog whose name is given in `USER-CATALOG` is scanned. If the user catalog name is not specified, the system catalog is scanned.
`USERCAT` | Return names of all user catalogs in the `USER-CATALOG` field.

Field Name | Format/Length
--- | ---
`PREFIX` | (A3)

Possible options:

Option | Explanation
--- | ---
`YES` | Default. Information on datasets with the value of the `DSNAME` field as prefix is retrieved.
`NO` | Value of the `DSNAME` field is taken as absolute dataset name, not a prefix.

Field Name | Format/Length
--- | ---
`SERIES` | (A8)

Device series (for example, `3330-1`).

Field Name | Format/Length
--- | ---
`TYPE` | (A8)

Dataset type. Possible values:

`ALIAS` | Alias.
`AIX` | Alternate index
`CLUSTER` | VSAM cluster.
`DATA` | VSAM data component.
`GDG` | Generation data group.
`GDS` | Generation dataset.
`INDEX` | VSAM index component.
`NONVSAM` | Non-VSAM dataset.
`PATH` | VSAM path.
`USERCAT` | User catalog.

Field Name | Format/Length
--- | ---
`USER-CATALOG` | (A44)

Name of the user catalog in which the dataset is cataloged (see also `OPTION` field).

Field Name | Format/Length
--- | ---
`VOLSER` | (A6)

Volume serial number of dataset. This field supports search criteria.

Field Name | Format/Length
--- | ---
`VOLUME-SEQUENCE` | (N3)

Volume sequence (tape datasets only).

## Example: Using CATALOG View

Assume the following datasets exist:

- `A.B.C`

- `A.B.C.D`

- `A.B.C.E`

The example program ...

    FIND CATALOG WITH
       DSNAME=<....>
       PREFIX=<....>
    DISPLAY DSNAME

... returns the following information:

      DSNAME        PREFIX   RETURNED DSNAMEs
      A.B.C         NO       A.B.C
      A.B.C         YES      A.B.C
                             A.B.C.D
                             A.B.C.E
      A.B           YES      A.B.C
                             A.B.C.D
                             A.B.C.E
      A.B           NO      (none) Error 5562 - Catalog entry not found.

      DSNAME        PREFIX   RETURNED DSNAMEs
      A.B.C         NO       A.B.C
      A.B.C         YES      A.B.C
                             A.B.C.D
                             A.B.C.E
      A.B           YES      A.B.C
                             A.B.C.D
                             A.B.C.E
      A.B           NO      (none) Error 5562 - Catalog entry not found.

### On this page

- Fields
- Relevant Error Codes
- Field Descriptions
- Example: Using CATALOG View