Primarily direct processing: HDAM

HDAM is efficient for a database that is usually accessed directly but sometimes sequentially. HDAM uses a randomizing routine to locate its root segments and then chains dependent segments together according to the pointer options chosen. The z/OS® access methods that HDAM can use are Virtual Storage Access Method (VSAM) and Overflow Storage Access Method (OSAM).

Important: PHDAM is the partitioned version of the HDAM database type. The corresponding descriptions of the HDAM database type therefore apply to PHDAM.

The requirements that HDAM satisfies are:

HDAM characteristics

An HDAM database:

  • Can store root segments anywhere. Root segments do not need to be in sequence because the randomizing routine locates them.
  • Uses a randomizing routine to locate the relative block number and root anchor point (RAP) within the block that points to the root segment.
  • Accesses the RAPs from which the roots are chained in physical sequence. Then the root segments that are chained from the root anchors are returned. Therefore, sequential retrieval of root segments from HDAM is not based on the results of the randomizing routine and is not in key sequence unless the randomizing routine put them into key sequence.
  • May not give the desired result for some calls unless the randomizing module causes the physical sequence of root segments to be in the key sequence. For example, a GU call for a root segment that is qualified as less than or equal to a root key value would scan in physical sequence for the first RAP of the first block. This may result in a not-found condition, even though segments meeting the qualification do exist.

For dependent segments, an HDAM database:

  • Can store them anywhere
  • Chains all segments of one database record together with pointers

An Overview of how HDAM works

This topic contains Diagnosis, Modification, and Tuning information.

When a database record is stored in an HDAM database, HDAM keeps one or more RAPs at the beginning of each physical block. The RAP points to a root segment. HDAM also keeps a pointer at the beginning of each physical block that points to any free space in the block. When you insert a segment, HDAM uses this pointer to locate free space in the physical block. To locate a root segment in an HDAM database, you give HDAM the root key. The randomizing routine gives it the relative physical block number and the RAP that points to the root segment. The specified RAP number gives HDAM the location of the root within a physical block.

Although HDAM can place roots and dependents anywhere in the database, it is better to choose HDAM options that keep roots and dependents close together.

HDAM performance depends largely on the randomizing routine you use. Performance can be very good, but it also depends on other factors such as:

  • The block size you use
  • The number of RAPs per block
  • The pattern for chaining together different segments. You can chain segments of a database record in two ways:
    • In hierarchic sequence, starting with the root
    • In parent-to-dependent sequence, with parents having pointers to each of their paths of dependents

To use HDAM for sequential access of database records by root key, you need to use a secondary index or a randomizing routine that stores roots in physical key sequence.