Converting a database from HISAM to HDAM

Converting a database from HISAM to HDAM can be performed in a few steps; however, you need to perform a number of preliminary steps also.

You need to do the following before changing your DL/I access method from HISAM to HDAM:

  • Determine what type of pointers you are going to use in the database. Unlike HISAM, HDAM uses direct-address pointers to point from one segment in the database to the next.
  • Determine which randomizing module you are going to use. Unlike HISAM, HDAM uses a randomizing module. The randomizing module generates information that determines where a database record will be stored.
  • Determine which HDAM options you are going to use. Unlike HISAM, an HDAM database is divided into two parts: a root addressable area and an overflow area. The root addressable area contains all root segments and is the primary storage area for dependent segments in a database record. The overflow area is for storage of dependent segments that do not fit in the root addressable area. The HDAM options here are the ones that pertain to choices you make about the root addressable area. These are:
    • The maximum number of bytes of a database record to be put in the root addressable area when segments in the database record are inserted consecutively (without intervening processing operations).
    • The number of blocks or CIs in the root addressable area.
    • The number of RAPs (root anchor points) in a block or CI in the root addressable area. (A RAP is a field that points to a root segment.)
  • Reassess your choice of logical record sizes. A logical record in HISAM can only contain segments from the same database record. In HDAM, a logical record can contain segments from more than one database record. In addition, HDAM logical records contain RAPs and two space management fields (FSEs and FSEAPs).
  • Reassess your choice of CI or block size. In HISAM, your choice of CI or block size should have been some multiple of the average size of a database record. In HDAM, the size should be chosen because of the characteristics of the device and the type of processing you plan to do.
  • Reassess your choice of database buffer sizes and the number of buffers you have allocated. If you have changed your CI or block size, you need to allocate buffers for the new size.
  • Recalculate database space. You need to do this because the changes you are making will result in different requirements for database space.

Once you have determined what changes you need to make, you are ready to change your DL/I access method from HISAM to HDAM. To do this:

Procedure

  1. Unload your database, using the existing DBD and the HD Reorganization Unload utility.
  2. Code a new DBD that reflects the changes you need to make.
  3. If you need to make changes that are not specified in the DBD (such as changing database buffer sizes or the amount of space allocated for the database), make these changes. HDAM only requires one data set, whereas HISAM requires two.
  4. For non-VSAM data sets, delete the old database space and define new database space. For VSAM data sets, delete the space allocated for the old clusters and define space for the new clusters.
  5. Reload the database using the new DBD and the HD Reorganization Reload utility. Make an image copy of your database as soon as it is reloaded.

    If you are using logical relationships or secondary indexes, you need to run additional utilities before reloading your database.