Rebuilding the databases to correct the problem
This topic explains how to repair a database by zapping the HD primary databases only. If an index database is damaged, rebuild it by reorganizing the primary database or by using some other means.
A database can be repaired by using the IMS recovery utilities, or by modifying the contents of the database with a ZAP utility (such as IMS Database Repair Facility). Normally, the IMS recovery utilities should be used (rather than zapping pointers) to recover the databases. Sometimes, zapping might be required or desirable.
The following table lists the abbreviations and full names of pointers.
| Pointer | Description |
|---|---|
| HF | Hierarchic Forward |
| HB | Hierarchic Backward |
| PTF | Physical Twin Forward |
| PTB | Physical Twin Backward |
| PP | Physical Parent |
| LTF | Logical Twin Forward |
| LTB | Logical Twin Backward |
| LP | Logical Parent |
| LCF | Logical Child First |
| LCL | Logical Child Last |
| PCF | Physical Child First |
| PCL | Physical Child Last |
| IN | Index |
| OF | Index, Overflow |
| SX | Secondary Index |
| SXO | Secondary Index, Overflow |
| RAP | Root Anchor Point |
| VLS | Variable Length Segment (Split) |
ZAPPING
Pointer zapping might be necessary when the user attempts to unload a database via the IMS HD Reorganization Unload utility. The database will then end abnormally with a return code of 85x. This could happen if a physical pointer is damaged (PTF or PCF). Zapping might also be necessary when the previous image copy has been lost or destroyed, or when the log tape is missing.
Pointer zapping is desirable when the user has a very large database that might require a long time to recover or reorganize.
The goal of zapping is to make the database structurally correct to IMS. If the pointer and the target are arbitrarily hooked to achieve this goal, delete the database record (and reinsert any lost data) when the system is backed up.
Inherent problems
Usually, database damages are concentrated to one or two database blocks. Some problems are inherent in repairing IMS databases because of the flexibility IMS offers the user in selecting the pointers.
To save DASD space, the database might have only forward pointers for dependent segments. This makes repair much more difficult than if the user selected both forward and backward twin pointers. The probability of both the forward and backward chains being broken is much less than the probability of only the forward chain being broken. To identify the parent of a dependent segment is very difficult unless the two segments are connected by a physical parent (PP) pointer.
The end of a twin chain is indicated by a PTF or LTF pointer with a value of binary zero. If you have a dangling chain, indicated by the FABP0960E error message, you could consider zapping the PTF or LTF pointer to zero and end the chain there. Zapping a pointer to zero might cause some unexpected results - especially if the segments in the chain are targets of a secondary index or a logical relationship.
How to use HD Pointer Checker
Before zapping a segment, it is necessary to understand the total effect that the zap can have. Knowing which segments point to the segment to be zapped helps design zaps that do not introduce new errors into the database. When TYPE=ALL is specified on the PROC statement as input for the PROCCTL data set, HD Pointer Checker prints a list of all segments that point to the 'invalid' segments; that is, segments identified in your HD Pointer Checker error messages. (This list can be incomplete if you run HD Pointer Checker with in-core pointer checking.) Analyze carefully each pointer that points to the segment to be zapped. Consider the effect that the zap has on all segments pointing to the about-to-be-changed segment.
Pointers that help in repair
- Physical parent-child relationship
- The physical parent (PP) pointer can be used to find the physical parent of a dependent segment. The physical child first (PCF) pointer can be used to find the start of a physical twin chain. The physical child last (PCL) pointer can be used to find the end of a physical twin chain.
- Logical parent-child relationship
- The logical parent (LP) pointer can be used to find the logical parent of a dependent segment. The logical child first (LCF) pointer can be used to find the start of a logical twin chain. The logical child last (LCL) pointer can be used to find the end of a logical twin chain.
Because these pointers are in a parent-child relationship, if one of them is broken, you might be able to reconstruct the broken chain by starting from either the parent, or the child, depending on which pointer is valid.