You can change the size of a catalog if the catalog is much larger
than necessary, or if it has grown into excessive secondary extents.
Before changing the size of a catalog, consider merging small catalogs
or splitting large catalogs.
When you change the size of a catalog, the catalog is also reorganized.
If you are decreasing the size of the catalog, you must be certain
to define the new catalog with enough space to contain all the entries
in the existing catalog. The catalog must also account for the free
space defined for the catalog.
Before changing 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 changes.
- Use IDCAMS DIAGNOSE and EXAMINE to ensure that the catalog does
not have errors.
- Consider using IDCAMS LISTCAT ALL on the catalog to be changed,
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 changing 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
changed, 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 changed.
Run the following commands as the
first part of the change
process and, if there are errors, make the required corrections before
proceeding with changing 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
The following steps show how
to change the size of a catalog. The catalog used in the example is
called ICFCAT.USER.VSYS303.
- 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 BCS with the desired space and performance attributes.
//DFNEWCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
DEFINE USERCATALOG -
(NAME(ICFCAT.USER.VSYS303) -
VOLUME(SYS303) -
MEGABYTES(15 5) -
ICFCATALOG -
LOCK -
FREESPACE(20 20) -
STRNO(3) -
) -
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) -
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(SYS303)))
- 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 any errors, make
the required corrections 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 there were no errors in the previous step , you can now unlock
the catalog:
//LOCKCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
ALTER ICFCAT.USER.VSYS303 UNLOCK
/*