Moving a Catalog to a Different Volume
The procedure for moving a catalog to a different volume is essentially the same as that described in Changing the Size of a BCS.
Before moving any catalog always:
- Ensure you have a good backup of a valid catalog. Using IDCAMS DIAGNOSE and EXAMINE on the catalog and correcting any errors before taking the backup will ensure you can fall back to a valid backup if there are problems. Having more than one copy is always a good idea in case one copy becomes damaged or lost. This backup can be a full volume dump of the volume the catalog is on, a DFDSS backup or IDCAMS EXPORT. Having all three gives you more options if you need to back out of the catalog move.
- Use IDCAMS DIAGNOSE and EXAMINE to ensure that the catalog does not have errors.
- Consider using IDCAMS LISTCAT ALL on the catalog to be moved, in case there are problems. Because this may produce a large volume of output you may wish to redirect the output to a data set, either by pointing the SYSPRINT DD statement to a data set or by using the OFILE keyword on the LISTCAT command.
- If you are moving a catalog that is shared across systems, a LISTCAT of the master catalog with the ALL keyword is needed to enable a redefine of any aliases that point to the user catalog that is being moved, unless you already have a job set up to define the aliases. If you already have a job, verify that it is current by comparing the LISTCAT output to the job.
- Quiesce all activity against the catalog that is to be moved.
//DIAGNOSE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DIAGDD DD DISP=SHR,DSN=your.user.catalog
//SYSIN DD *
DIAGNOSE ICFCATALOG INFILE(DIAGDD)
//EXAMINE1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EXAMINE NAME(your.user.catalog) -
INDEXTEST NODATATEST ERRORLIMIT(1000)
//EXAMINE2 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
EXAMINE NAME(your.user.catalog) -
NOINDEXTEST DATATEST ERRORLIMIT(1000)
//LISTCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
LISTCAT CAT(your.user.catalog) ALL
- Lock the catalog.
//LOCKCAT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //SYSIN DD * ALTER ICFCAT.USER.VSYS303 LOCK /*
- Issue the following command on each system that shares the catalog:
F CATALOG,NOVLF(ICFCAT.USER.VSYS303)
- If the catalog is shared with other systems and those other systems
do not all share the same master catalog, then EXPORT DISCONNECT the
catalog on all other systems other than the system you are running
the jobs to resize the catalog on.
//EXPDISC EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * EXPORT ICFCAT.USER.VSYS303 DISCONNECT
- Export the BCS with the EXPORT command. The aliases of the catalog
are saved with the exported copy, and can be used in later steps to
redefine the aliases. You must create a sequential
data set for the catalog export, if one does not already exist.
//EXPORT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //EXPDD DD DSN=CATBACK.ICFCAT.USER.VSYS303,DISP=OLD //SYSIN DD * EXPORT ICFCAT.USER.VSYS303 - OUTFILE(EXPDD) - TEMPORARY /*
- Delete the BCS with the RECOVERY option.
//DELCAT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //SYSIN DD * DELETE ICFCAT.USER.VSYS303 - RECOVERY - USERCATALOG /*
- Redefine the catalog specifying the new volume. In the example,
the new volume is SYSNEW. You may also change the space and performance
attributes at this time.
//DFNEWCAT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //SYSIN DD * DEFINE USERCATALOG - (NAME(ICFCAT.USER.VSYS303) - VOLUME(SYSNEW) - MEGABYTES(15 5) - ICFCATALOG - LOCK-FREESPACE(20 20) - STRNO(3) - REPLICATE ) - DATA( CONTROLINTERVALSIZE(4096) - BUFND(4) ) - INDEX( CONTROLINTERVALSIZE (4096) - BUFNI(4) ) /*
- Import the BCS using the IMPORT command. Specify INTOEMPTY on
the IMPORT command. Also, specify ALIAS, so that the aliases exported with the catalog are redefined.
//IMPORT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //SYSIN DD * IMPORT INDATASET(CATBACK.ICFCAT.USER.VSYS303) - OUTDATASET(ICFCAT.USER.VSYS303) - OBJECTS((ICFCAT.USER.VSYS303 - VOLUMES(SYSNEW)) - ALIAS - LOCK - INTOEMPTY /*
- If the catalog is shared with other systems that do not share
the same master catalog then you will need to IMPORT CONNECT on all
other systems that share the catalog.
//IMPRTCON EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * IMPORT CONNECT - OBJECTS((ICFCAT.USER.VSYS303) - DEVICETYPE(3390) - VOLUMES(SYSNEW)))
- If the catalog is shared with other systems that do not share the same master catalog then you will need to define the aliases for that catalog on the other systems that do not share the same master catalog.
- Run the following commands and, if there are errors, correct them
before unlocking the catalog.
//DIAGNOSE EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //DIAGDD DD DISP=SHR,DSN=your.user.catalog //SYSIN DD * DIAGNOSE ICFCATALOG INFILE(DIAGDD) //EXAMINE1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * EXAMINE NAME(your.user.catalog) - INDEXTEST NODATATEST ERRORLIMIT(1000) //EXAMINE2 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * EXAMINE NAME(your.user.catalog) - NOINDEXTEST DATATEST ERRORLIMIT(1000) //LISTCAT EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSIN DD * LISTCAT CAT(your.user.catalog) ALL .
- If you did not unlock the catalog when you imported it, unlock
it with the ALTER UNLOCK command. Alternatively, if you do not want to do the DELETE, DEFINE, and IMPORT described in Steps 5 through 7, you can import the catalog to the new volume using the IMPORT command with the OBJECTS parameter. Note that IMPORT deletes the old catalog on the previous device and moves the catalog to the specified different volume.
//NEWVOL EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=A //SYSIN DD * IMPORT INDATASET(CATBACK.ICFCAT.USER.VSYS303) - OUTDATASET(ICFCAT.USER.VSYS303) - OBJECTS((ICFCAT.USER.VSYS303 - VOLUMES(SYSNEW))) - ALIAS - LOCK /*
In this example, the new volume is SYSNEW, and is specified in the OBJECTS parameter.
If the target device type has different device characteristics, the new catalog can have different data and index component control interval sizes. If you do not want the attributes of the catalog to change use the method described in Steps 4 through 6; that is, delete the catalog with DELETE RECOVERY, define a catalog with the desired attributes on the new volume, and import the original catalog into the newly defined catalog.
Catalog clusters with RACF® discrete profiles use the catalog volume for RACF discrete profile checking. If a catalog is moved to a new volume, all catalog clusters with a discrete profile that reside in that catalog must have their RACF discrete profiles updated with the new catalog volume.