CATALOG Statement

<catalog statement>

                         ┌◄────────────── , ─────────────┐
── CATALOG ─┬─ ADD ────┬─┴─┬─<file name constant>──────┬─┴─────────────►
            ├─ DELETE ─┤   └─<directory name constant>─┘
            └─ PURGE ──┘
►─┬───────────────────────────────────────────────────────────┬────────┤
  │     ┌◄────────────────────── , ─────────────────────┐     │
  └─ ( ─┴─┬─────────────┬─┬─ DISK ────────────────────┬─┴─ ) ─┘
          ├─ KIND ── = ─┘ ├─ PACK ────────────────────┤
          │               └─ TAPE ────────────────────┤
          ├─ GENERATION ── = ──<integer constant>─────┤
          ├─ CYCLE ── = ──<integer constant>──────────┤
          ├─ VERSION ── = ──<integer constant>────────┤
          ├─ SERIALNO ── = ──<serial number list>─────┤
          └─ FAMILYNAME ── = ──<family name constant>─┘

Explanation

Note: Cataloging is not supported for files within the permanent directory namespace.

The CATALOG statement applies only to a cataloging system. Cataloging provides an automated method for locating copies of files that are on disk or tape. Cataloged files can be stored only on disk or tape that has been entered into the cataloging volume library with the VOLUME ADD statement. Different copies of a file are referred to as generations.

For tape, the CATALOG ADD statement enters the name of a permanent file or directory into the catalog. For disk, CATALOG ADD marks the requested generation of each of the requested files as cataloged.

The CATALOG DELETE statement removes all references to the specified generation of the specified files from the system catalog. If the specified generation is resident on disk, the statement also marks that file as not cataloged.

The CATALOG PURGE statement removes all the backup file information for all generations of the specified files. If there is a resident generation on disk, the statement also marks that file as not cataloged.

The CATALOG DELETE and CATALOG PURGE statements delete only catalog entries; the resident and backup files are still available but cannot be accessed through the catalog.

The generation is determined by the integer file attributes GENERATION, CYCLE, and VERSION, as well as by the time stamp automatically maintained by the system. The most recent generation is given by a value of 0 for GENERATION or, if GENERATION is not specified, by the highest value of CYCLE and the highest value of VERSION within that cycle. For the CATALOG DELETE and CATALOG ADD statements, you can use these file attributes to identify a specific file generation.

The SERIALNO option is required in either of the following cases:

  • If KIND = TAPE

  • If KIND = PACK and the family is offline

Family substitution is used if the job or task has an active family specification. Only the primary family name is used. Refer to FAMILY Assignment and Interrogating Complex Task Attributes.

Examples

The following are examples of the CATALOG statement:

CATALOG ADD FILEA (KIND=PACK, SERIALNO=123456)
CATALOG DELETE = (KIND=TAPE,VERSION=12,CYCLE=5)
CATALOG PURGE FILEA,FILEB(KIND=PACK)