Analyzing a repair, DSN1COPY or DSN1PRNT dump

If you know which DBD is involved in the problem and you do not have an SVC dump that includes the DBD, obtain a REPAIR dump of the various sections of the DBD or a DSN1COPY or DSN1PRNT dump of the data set that contains the DBD.

About this task

If the data set is large, you might want to dump the individual pages that the following procedures point you to, rather than expend the resources necessary to obtain a dump of the entire data set. However, dumping individual pages can involve a great deal of work.

This task explains how to obtain a dump of specific data areas by using the REPAIR utility. You can also obtain a dump of these areas by using the DSN1COPY or DSN1PRNT utility.

If a DSN1PRNT dump is used to analyze the inconsistency, the FORMAT option should not be specified when the dump is printed. This option separates the header and anchor point area from the rest of the page, labels the individual fields of the header, and does not show the offsets from the beginning of the page, making it difficult to analyze the page.

Procedure

To obtain a REPAIR dump:

  1. DBDs are stored in the Db2 directory in the DBD01 page set (vsamcatalogname.DSNDBD.DSNDB01.DBD01.I0001.A001) in DBDR and DBDS records. The DBDR (parent) record is connected to the DBDS (child) record via a link. Use the following steps to locate the DBDR:
    1. The anchor point of the DBD contains the RID of the first DBDR on the hash chain. Use the hashing algorithms to find the page number and anchor point.
    2. Use the REPAIR utility with the DUMP control statement to dump the page of anchor points.

      The REPAIR utility expects page numbers to be given in hexadecimal, and offsets in either decimal or hexadecimal.

    3. After the anchor point is found, use the REPAIR utility with the DUMP control statement to dump the page that is specified in the first RID (if the page has not already been dumped).
  2. Use the ID map entry value in the fourth byte of the first RID to locate the first DBDR record in the hash chain.
  3. After you located the first DBDR in the chain, determine whether the DBID at offset X'16' in the DBDR matches the DBID of the DBD being checked.
    Option Description
    If the DBID matches: Continue with step 4.
    If the DBID does not match: Follow the hash chain (the RID at offset X'06' of the DBDR) forward until you locate the DBDR with a DBID that matches the DBD in question. If a REPAIR, DSN1COPY or DSN1PRNT dump of the entire page set is not available, dump the page that the RID points to.

    The following figure illustrates the structure of DBDRs in the hash chain of an anchor point.

    Figure 1. DBDRs in hash chain. DBDS records are linked to DBDRs to store more DBD data.
    Begin figure description. This figure displays the anchor point that contains the RID of the first and last DBDR on the hash chain. End figure description.
  4. Next, find the DBDS (child) records.
  5. To locate the first DBDS record in the link fan set, use the RID at offset X'0E' of the DBDR. A RID of 0 indicates that no child exists for this parent record.
  6. Use the forward link pointer at offset X'06' of the first child record to locate the second child record.
  7. Continue to use the forward link pointers to locate successive child records in the link fan set. The forward link pointer of the last child record contains the RID of the parent record; the high-order bit of the last byte in the RID should be turned on.
  8. After you locate the parent (DBDR) and all the child (DBDS) records for the DBD, logically concatenate the data areas of these records so they can be analyzed as if they were in one contiguous section.
  9. Continue with Analyzing a DBD.