Converting a database from HISAM to HIDAM

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

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

  • Determine whether you are going to set aside free space in the HIDAM database. (Free space is space into which database records are not loaded when the database is initially loaded.)

    Unlike HISAM, in a HIDAM database you can set aside periodic blocks or CIs of free space or a percentage of free space in each block or CI (in the ESDS or OSAM data set). This free space can then be used for inserting database records or segments into the database after initial load.

  • Determine what type of pointers you are going to use in the database. Unlike HISAM, HIDAM uses direct-address pointers to point from one segment in the database to the next.
  • Reassess your choice of logical record size. A logical record in HISAM can only contain segments from the same database record. In HIDAM, a logical record can contain segments from more than one database record.
  • 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 HIDAM, 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 HIDAM. 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. You must also code a DBD for the HIDAM index.
  3. If you need to make change 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.
  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. 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 immediately before and after reloading your database.