Converting a database from HDAM to HISAM

Converting a database from HDAM to HISAM 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 HDAM to HISAM:

  • Reassess your choice of logical record size. A logical record in HISAM can only contain segments from the same database record. In HISAM, a logical record can contain segments from more than one database record.
  • Reassess your choice of CI or block size. In HDAM, your choice of CI or block size should be based on the characteristics of the device and the type of processing you plan to do. In HISAM, the size should be some multiple of the average size of a database record.
  • 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 recalculate database space because the changes you are making will result in different requirements for database space.

After you have determined what changes you need to make, you are ready to change your DL/I access method from HDAM to HISAM. Remember you must write your own unload and reload programs unless database records in the HDAM database are in physical root key sequence. In writing your own load program, if your HDAM database uses logical relationships, you must preserve information in the delete byte (for example, a segment that is logically deleted in the database might not be physically deleted).

To change from HDAM to HISAM:

Procedure

  1. Unload your database using the existing DBD and one of the following:
    • Your unload program
    • The HD Reorganization Unload utility if database records are in physical root key sequence
  2. Code a new DBD that reflects the changes you need to make. You will not be specifying direct-address pointers or HDAM options.
  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:
    • Your load program, or
    • The HD Reorganization Reload utility if database records are in physical root key sequences

      Remember to 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 right before and after reloading your database.