30 ICF Catalog Backup and Recovery: A Practical Guide
3.5 Synchronization errors
In addition to the internal structure and content of catalogs, you should also
check for synchronization errors. Inconsistencies between the BCS, VVDS, and
VTOC may make a data set inaccessible or otherwise unusable.
Synchronization errors may be the result of the IDCAMS DEFINE, DELETE, or
ALTER jobs that were canceled by force, or due to system errors not allowing a
job to complete successfully. In either case, the necessary cleanup actions may
not have been done. Errors could also result from someone scratching a DCSB
from the VTOC rather than deleting a data set with a utility that takes care of
VTOC entries. Most frequently they are simply the result of
having restored a BCS or volume and not yet having completed forward recovery
to resynchronize all structures with reality.
The two most common synchronization errors are:
BCS entry missing in catalog named in VVR or NVR
VVDS entry missing on volume named in BCS
Note that the first condition does not actually mean the data set is not cataloged.
It simply is not in the BCS where the VVR or NVR says it is cataloged. It could be
cataloged in a different BCS. Note also that the second condition does not mean
the data set does not exist. It is simply not on the volume named in the catalog. It
could be elsewhere.
You may also discover “orphan” VVRs or NVRs with no BCS or VTOC entries, or
a situation where there are BCS and VVDS entries but no entry in the VTOC. In
either of these cases, the data set no longer exists on the volume where it is
expected to be. Recovering requires you to clean up the left over pieces and then
find the data set and recatalog it or restore it from a backup.
VSAM data sets and non-VSAM system-managed data sets with a high level
qualifier of SYS1 can be cataloged in more than one BCS. This can be done with
IDCAMS DEFINE RECATALOG. In this case, the VVR or NVR still points to the
original catalog. This is a situation which might be detected by DIAGNOSE, but it
is not considered a structural or synchronization error.
3.5.1 Detecting synchronization errors with DIAGNOSE
Using the IDCAMS DIAGNOSE command, you can analyze the content and
validity of related BCS and VVDS records. Specify the COMPAREDD or the
COMPAREDS keyword with the DIAGNOSE command to indicate which data
sets are to be checked to confirm that they point to the BCS or VVDS being
does not fix anything. It simply identifies any
Chapter 3. Analyzing catalog integrity 31
To compare a BCS against the VVDS, specify:
DIAGNOSE ICFCATALOG INDATASET(bcsname) COMPAREDD(voldd)
To compare a VVDS against a BCS, specify:
DIAGNOSE VVDS INFILE(voldd) COMPAREDS(bcsname)
A VVDS must be identified with the INFILE or COMPAREDD parameter and a
DD statement. A BCS may be referenced using INDATASET or COMPAREDS. To
make sure that all possible errors will be detected, you must perform both
checks. Only one BCS or VVDS can be diagnosed at a time, but up to 99 BCSs
or VVDSs can be specified on the compare parameter.
DIAGNOSE BCS compare
Figure 3-4 illustrates processing that occurs when you diagnose a BCS
comparing to a VVDS using the command:
DIAGNOSE ICFCATALOG INDATASET(BCS1) COMPAREDD(VOLDD1)
Figure 3-4 DIAGNOSE processing: BCS compared to VVDS
Note the following points:
Every record in BCS1 is diagnosed.
Only the VVDS entries on VOL001 pointed to by BCS1 are diagnosed.
DS1 - VOL001
DS2 - VOL002
DS3 - VOL001
DS4 - VOL003
DS5 - VOL999
DS1 - BCS1
DS7 - BCS3
DS8 - BCS3
DS9 - BCS1