Rebuilding a Catalog

You may have to rebuild your catalog if it gets damaged. Use the following procedure:

  1. Run a LISTCAT command to determine which files own space on the volume. Assuming that you want to save the contents of these files, determine if an acceptable back level copy exists of each. If not, save the contents of these files by running either BACKUP or REPRO.

    The BACKUP command is preferable, because it automatically saves any alternate indexes built over the cluster backed up. (If REPRO is used, you must rebuild these alternate indexes at restoration.) If there is catalog damage, it may not be possible to recover all files.

  2. Issue a DELETE command for every object in the catalog. (alternate indexes and paths associated with the file are automatically deleted.)
  3. Issue a DELETE SPACE command for all volumes owned by the catalog.
  4. Delete the catalog itself.
  5. Define the catalog.
  6. Issue a DEFINE SPACE command for any volumes on which the catalog will own space.
  7. Define a compression control data set.
  8. If any files (and associated alternate indexes or paths) were deleted in step 1, reintroduce them into the catalog in one of the following ways:
    • If you used BACKUP in step 1, use the RESTORE command to define and restore objects saved in step 1.
    • If you used REPRO in step 1, DEFINE every object that was deleted in step 2. Then use REPRO to restore the objects saved in step 1. Also DEFINE any alternate indexes or paths deleted in step 2. Recreate any associated alternate indexes using the BLDINDEX command.