You cannot directly rename a catalog with the ALTER command. To
rename a catalog, you must define a new catalog with the desired name
and copy the old catalog into it. You can do this with the REPRO NOMERGECAT
command.
REPRO NOMERGECAT is used to copy a catalog into an empty target
catalog. Refer to z/OS DFSMS Access Method Services Commands to
determine if the REPRO NOMERGECAT option is appropriate for you.
All aliases to the old catalog must be redefined as aliases of
the new catalog. Aliases are not automatically oriented to the new
catalog.
The following steps show how to rename ICFCAT.USER.VSYS303 to ICFCAT.REPRO.VSYS303:
- Before you rename a catalog, make sure it does not have structural
and logical errors; to do this, run IDCAMS DIAGNOSE and EXAMINE jobs.
- When you use NOMERGECAT, recovery is required in the event of
a failure. Make sure you have a current back up of the catalog.
- Lock the old catalog using ALTER LOCK.
- List the aliases of the old catalog using LISTCAT. Specify the
name of the old catalog in the ENTRIES parameter, and specify the
ALL parameter. This lists all the aliases of the catalog in the ASSOCIATIONS
group of the LISTCAT listing.
Specify a data set using the OUTFILE
parameter to contain the LISTCAT listing. This data set can be used
in step 8.
- Define the new catalog with the desired name, size, and other
attributes. You can use the old catalog as a model.
- Copy the original catalog into the new catalog using the REPRO
NOMERGECAT command. Specify the old catalog in the INDATASET parameter,
and the new catalog in the OUTDATASET parameter. Do not specify any
other parameters.
Refer to Recovering from a REPRO NOMERGECAT Failure.
You
can use REPRO with the MERGECAT option for this step. Refer to z/OS DFSMS Access Method Services Commands to
determine if the MERGECAT option is appropriate for you.
- Delete the original catalog with the RECOVERY option. This also
deletes the old aliases.
- Use the listing of aliases created with LISTCAT to
create a sequence of DEFINE ALIAS commands for each alias. Specify
the name of the new catalog in the RELATE parameter.