Checking and Fixing Paths [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation
DBChange Plus User's Guide
Checking and Fixing Paths
This section explains how to check a data set path for inconsistencies
and how to fix a path that contains inconsistencies. To check a path for
broken chains and incorrect pointer linkages, use the CHECK PATH command.
To correct problems found after using CHECK PATH, use the FIX PATH
command. You can use CHECK PATH and FIX PATH for either master or detail
data sets.
Checking Paths
When used on a master data set, CHECK PATH checks the synonym chain
pointers in the master set. When used on a detail data set, CHECK PATH
checks the chain pointers in both the detail data set and associated
master data sets. The output for both master data sets and detail data
sets is the same. In the following example, the master data set CUSTOMER
is checked:
>check path customer
Check Set issued for 1 set(s).
>
If you want to verify that the CHECK PATH command is pending, use the
REVIEW PATHS command. Refer to "REVIEW PATHS" in chapter 10, "DBChange
Plus Commands."
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the following output
is displayed:
Check file ORDERSRX exists; it will be overwritten (DBA 125).
Starting data set serial reads.
Tabulating statistics.
CHECK PATH
Pct
Set Name Type Max Avg Std Far Avg Packing
Search Item (PS) Chain Chain Dev Ptrs Blocks Ratio
----------------------------------------------------------------------
CUSTOMER M
SYNONYM CHAINS 1 1.00 0.00 0 1.00 N/A
Starting data set chained reads.
CHECK INFORMATION
Set Name Type
Search Item
Message(s)
------------------------------------------------------------------------
CUSTOMER M
Userlabel entry count does not match bitmap entry count (CHK 560).
Record 6 is not linked into the proper synonym chain (CHK 360).
SALES D
ACCOUNT (Path 1; linked to master CUSTOMER, path 1)
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
Analyzing the CHECK PATH Statistics.
CHECK PATH performs a serial read followed by a chained read on the data
set specified. If you use the QUICK parameter, only a serial read is
performed. The output is in two sections: CHECK PATH and CHECK
INFORMATION.
When reviewing the CHECK PATH statistics, first examine the Packing Ratio
and Avg Chain statistics to help you determine which problems may exist.
Under the CHECK PATH section of the output, the following information is
displayed for the above example:
* The data set name. CUSTOMER is the name of the master data set.
* The search item name. Because no search item exists in a master
data set, the text SYNONYM CHAINS appears in the field. For a
detail data set, the search item name would appear in this field.
* The data set type. The following are valid data set types:
M is a manual master data set.
A is an automatic master data set.
D is a detail data set.
* Max Chain and Avg Chain are the number of entries in the longest
synonym or detail chain and the average number of entries per
chain, respectively. While long chains are not necessarily
harmful to the database, you may want to consider the following
guidelines when evaluating chain lengths:
* Choosing an efficient capacity will keep synonym chains to
a minimum.
* The Avg Chain should not exceed 40 percent of the capacity
unless it's necessary for the application program.
* The data item most heavily used by an application should be
specified as the search item for a detail data set repack.
This makes for a more efficient repack.
* Sorted chains should be less than 50 records unless key
values are added in ascending order over time. For
example, a date field where the currently added date will
always be greater than any of the prior dates can exceed
more than 50 records.
* Std Dev (standard deviation) is an indication of the accuracy of
the Avg Chain statistic. The closer to 0.00 this number is, the
more accurate the Avg Chain statistic is.
* Pct Far Ptrs is the percentage of forward pointers that point
outside the current block. This statistic can be used to enhance
the packing ratio described below. The Pct Far Ptrs represents
the number of pointers that point beyond the current block.
* Avg Blocks is the average number of blocks per chain.
* Packing Ratio is the efficiency of the path. It is the optimal
average number of blocks per chain divided by the actual average
number of blocks per chain. A value of 100 percent means that
every individual chain for the specified path occupies the minimum
number of blocks possible. Although packing ratios vary from
application to application, try to maintain a packing ratio of at
least 60 percent on primary paths.
The CHECK INFORMATION section of the output identifies specific records
in the data set that contain problems. If no problems are found, the
following message is displayed:
No problems were detected by CHECK.
Fixing Paths
When used on a master data set, FIX PATH examines and attempts to correct
problems with the synonym chain pointers. When used on a detail data
set, FIX PATH examines and attempts to correct the path chain pointers in
both the detail data set and associated master data sets. In the
following example, FIX PATH is used to correct the problems found in the
previous CHECK PATH example:
>fix path customer
Fix Path issued for 1 set(s).
>
If you want to verify that the FIX PATH command is pending, use the
REVIEW PATHS command. Refer to "REVIEW PATHS" in chapter 10, "DBChange
Plus Commands."
After issuing a PERFORM COMMANDS to invoke DBAPLUS, the following output
is displayed:
Check file ORDERSRX exists; it will be overwritten (DBA 125).
Starting data set serial reads.
Tabulating statistics.
CHECK PATH
Pct
Set Name Type Max Avg Std Far Avg Packing
Search Item (PS) Chain Chain Dev Ptrs Blocks Ratio
----------------------------------------------------------------------
CUSTOMER M
SYNONYM CHAINS 1 1.00 0.00 0 1.00 N/A
Starting data set chained reads.
CHECK INFORMATION
Set Name Type
Search Item
Message(s)
------------------------------------------------------------------------
CUSTOMER M
Userlabel entry count does not match bitmap entry count (CHK 560).
SALES D
ACCOUNT (Path 1; linked to master CUSTOMER, path 1)
Sum of chain counts in the related master set does not
match bitmap entry count for this set (CHK 580).
FIX INFORMATION
------------------------------------------------------------------------
All problems detected have been fixed.
HP36386 (A.00.00) DBCHANGE (c) COPYRIGHT Hewlett-Packard Co. 1985
>
The FIX PATH output is similar to the CHECK PATH output. The same CHECK
PATH and CHECK INFORMATION reporting occurs. In addition, FIX
INFORMATION reports the status of the FIX PATH process. In the above
example, FIX PATH corrected all problems found.
MPE/iX 5.0 Documentation