You can split a catalog into two catalogs or to move a group of
catalog entries, if you determine that a catalog is either unacceptably
large or that it contains too many entries for critical data sets.
If the catalog is unacceptably large (a catalog failure would leave
too many entries inaccessible), then you can split the catalog into
two catalogs. If the catalog is of an acceptable size but contains
entries for too many critical data sets, then you can simply move
entries from one catalog to another.
Attention: Performing REPRO on a catalog while data sets
are open in the source catalog might result in a loss of information
if any of those data sets extend, or other catalog updates are made.
The changes might not be copied to the target catalog, resulting
in a mismatch between the information contained in the VVDS and the
new target BCS. This might cause the data sets to be inaccessible
or receive errors when they are used.
To split a catalog or move a group of entries, use the access method
services REPRO MERGECAT command. The following steps should be followed
to split a catalog or to move a group of entries:
- Use ALTER LOCK to lock the catalog. If you are moving
entries to an existing catalog, lock it as well.
- If you are splitting a catalog, define a new catalog
with DEFINE USERCATALOG LOCK.
- Use LISTCAT to obtain a listing of the catalog aliases
that you are moving to the new catalog. Use the OUTFILE parameter
to define a data set to contain the output listing.
- Use EXAMINE and DIAGNOSE to ensure that the catalogs are error-free.
Fix any errors indicated.
- Use REPRO MERGECAT to split the catalog or move the group of entries.
When splitting a catalog, the OUTDATASET parameter specifies the
catalog created in 2. When moving
a group of entries, the OUTDATASET parameter specifies the catalog
that is to receive the entries. This step can take a long time to
complete.
Use the ENTRIES or LEVEL parameter to specify which
catalog entries are to be removed from the source catalog and placed
in the catalog specified in OUTDATASET.
Note: - The use of the LEVEL or ENTRIES parameter will not move extended
aliases to the new catalog. For more information on extended aliases,
see Extended Alias Support.
- In some cases, use of the LEVEL or ENTRIES parameter may cause
data sets to no longer be found. For example, consider a data set
named AAA.LOADLIB that has an alias of BBB.LOAD:
- If a REPRO MERGECAT is run with LEVEL parameter specified as LEVEL(BBB),
the alias will not move to the output catalog. And after the alias
BBB is deleted and redefined to point to the output catalog, the data
set cannot be located using the alias.
- If a REPRO MERGECAT is run with the LEVEL parameter specified
as LEVEL(AAA) the data set and the alias will move to the output catalog.
But unless the alias BBB is deleted and redefined to point to the
output catalog, the data set cannot be located through the alias.
For this example, running two REPRO MERGECAT job/steps with
a specification of LEVEL(AAA) and LEVEL(BBB) and then deleting and
redefining of the aliases AAA and BBB to point to the output catalog
will allow the data set to be accessed through both the alias and
the data set name.
The ENTRIES parameter can cause similar
problems, which can be resolved using a similar method.
If this step fails for any reason, see Recovering from a REPRO MERGECAT Failure.
- Use the listing created in 3 to
create a sequence of DELETE ALIAS and DEFINE ALIAS commands for each
alias. These commands delete the alias to the original catalog, and
redefine them as aliases for the catalog that now contains entries
belonging to that alias name.
The DELETE ALIAS/DEFINE ALIAS sequence
must be run on each system that shares the changed catalogs.
Any
data sets with extended aliases that may have been affected by the
REPRO MERGECAT must have their individual extended aliases deleted
and redefined. For more information on extended aliases, see Extended Alias Support. Data sets whose aliases are cataloged
at identical LEVELs can be moved without a need for further delete/define
activity for the individual data sets.
- Unlock both catalogs using ALTER UNLOCK.