Converting a database from HDAM to HIDAM

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

You need to make the following changes before changing your DL/I access method from HDAM 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.) 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. In an HDAM database, you generally get the free space you need by careful choice of HDAM options.
  • Reassess your choice of direct-address pointers. Although both HIDAM and HDAM use direct-address pointers, you might need to change the type of direct-address pointer used:
    • Because of the changing needs of your applications.
    • Because pointers are partly chosen based on the type of database you are using. For example, you can chose to use physical twin forward and backward pointers on root segments in your HIDAM database to get fast sequential processing of roots.
  • Reassess your choice of logical record size.
  • Reassess your choice of CI or block size.
  • 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.

Once you have determined what changes you need to make, you are ready to change your DL/I access method from HDAM to HIDAM. 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 HIDAM:

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 must also code a DBD for the HIDAM index. You will not be specifying HDAM options but you probably will be specifying free space.
  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 HIDAM 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 one of the following:
    • Your load program
    • The HD Reorganization Reload utility if database records are in physical root key sequence.
    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 before reloading your database.