You can recover a BCS that was backed up with the access method
services EXPORT command, the DFSMSdss logical DUMP command, or the
DFSMShsm BACKDS command or automatic backup. To recover the BCS, use
the IDCAMS IMPORT command, the DFSMSdss RESTORE command, or the DFSMShsm
RECOVER command.
When you recover a BCS using these commands, you do not need to
delete and redefine the target catalog unless you want to change the
catalog's size or other characteristics, or unless the BCS is damaged
in such a way as to prevent the usual recovery. The recovered catalog
is reorganized when you use IMPORT or RECOVER, but not when you use
RESTORE.
Aliases to the catalog can be defined if you use DFSMSdss, DFSMShsm,
or if you specify ALIAS on the IMPORT command. If you have not deleted
and redefined the catalog, all existing aliases are maintained, and
any aliases defined in the backup copy are redefined if they are not
already defined.
If you do not first delete the catalog you are recovering (specifying
RECOVERY), the catalog is deleted and redefined according to the attributes
of the backup copy. If you delete and redefine the catalog before
you recover it (and the newly defined catalog is empty), the backup
copy is copied into the new catalog. Specify INTOEMPTY on the IMPORT
command if you define the catalog before importing it.
When using IMPORT with the OUTFILE parameter, the DD statement
defining the catalog must have a disposition of OLD.
Before you recover a BCS, lock the BCS. After you recover the catalog,
update the BCS with any changes which have occurred since the last
backup. You can use the access method services DIAGNOSE command to
identify certain unsynchronized entries.
To simplify catalog recovery and improve data availability
for your installation, use the Integrated Catalog Forward Recovery
Utility (ICFRU) to update the BCS to a current status. For more information,
see Integrated Catalog Forward Recovery Utility (ICFRU).
The following are the steps needed to recover a BCS using the IMPORT
command. For further discussion of using DFSMSdss and DFSMShsm in
BCS recovery, see z/OS DFSMSdss Storage Administration and z/OS DFSMShsm Storage Administration. The catalog being recovered is
SYS1.ICFCAT.PROJECT1.
- If the catalog is used by the job scheduler for any batch jobs,
hold the job queue for all job classes except the one you use for
the recovery. Interactive users are returned appropriate messages
if a catalog is locked and they try to use it. However, batch jobs
fail with a JCL error if they try to use a locked catalog.
- Lock the catalog so that access is restricted. Note that in order
to lock or unlock a catalog, you must have READ access to the IGG.CATLOCK
profile in RACF®, and ALTER
authority to the catalog. See Locking a Catalog for
more information.
//LOCKCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
ALTER SYS1.ICFCAT.PROJECT1 LOCK
/*
- Use the Integrated Catalog Forward Recovery Utility
to create an updated EXPORT backup copy of the BCS, using the last
backup copy and the appropriate SMF records.
- Import the most current backup copy of the BCS (which contains
the BCS's aliases as they existed when the backup was made) using
the access method services command IMPORT ALIAS LOCK. The most current
backup is the one created in step 3.
If the aliases are not needed, do not specify the ALIAS parameter.
If you do not specify LOCK, the catalog is unlocked.
//RECOVER EXEC PGM=IDCAMS
//BACKCOPY DD DSN=BACKUP.SYS1.ICFCAT.PROJECT1,DISP=OLD
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
IMPORT INFILE(BACKCOPY) -
OUTDATASET(SYS1.ICFCAT.PROJECT1) -
ALIAS -
LOCK
/*
- If you did not use the Integrated Catalog Forward Recovery Utility
to create an updated backup copy of the BCS, you need to manually
check for recent changes to the BCS which are not reflected in the
recovered copy.
Use the SMF records which record changes to the
catalog, and any tape management records you keep. An DFSMShsm audit
might also be helpful.
The backup or portable copy of a catalog
reflects the contents of the catalog at the time it was backed up
with EXPORT, DFSMSdss, or DFSMShsm. Any subsequent ALTER, DEFINE or
DELETE operations are not reflected in the catalog when it is imported.
The
access method services command DIAGNOSE can be used after importing
the catalog, to help assess activity not reflected in the imported
catalog. However, DIAGNOSE is only useful for VSAM or SMS-managed
data sets on DASD. Tape data sets cannot be processed by DIAGNOSE.
List the VVDSs connected to the catalog to determine which VVDSs to
compare with the BCS.
If you were able to list the non-VSAM
data sets before recovering the catalog, compare the list taken before
the recovery with one taken after the recover. Make any needed changes
by following the procedures in Updating the Catalog After Recovery.
For
complete information on using DIAGNOSE, see Analyzing a Catalog for Synchronization Errors.
- Use the EXAMINE and DIAGNOSE commands to check the integrity of
the recovered catalog's structure and content. If EXAMINE indicates
structural errors, you need to recover the next most recent backup
copy, repeating these steps. If DIAGNOSE indicates errors, address
the errors as appropriate.
//EXAMINE EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
EXAMINE NAME(SYS1.ICFCAT.PROJECT1) -
INDEXTEST -
DATATEST
/*
- If you recovered the catalog onto a volume with a different volume
serial number or device type (for example, if the catalog was damaged
due to volume damage), and the catalog is shared with other systems,
use IMPORT CONNECT ALIAS to update the catalog connector records in
the master catalogs of the sharing systems. See Recovering Shared Catalogs for more information on recovering
shared catalogs.
- Unlock the catalog with the command ALTER UNLOCK to allow general
access.
//UNLCKCAT EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
ALTER SYS1.ICFCAT.PROJECT1 UNLOCK
/*
- Free the job queue if you put it on hold.