Unloading and reloading using the reorganization utilities

In some cases, you can add segment types to a database record by using the reorganization utilities.

You can add segment types to a database record using the reorganization utilities if:  

  • The segment type to be added is at the bottom level of a path in the hierarchy. The following figure shows an existing database record (indicated by solid lines) and the places where a new segment type can be added (indicated by dashed lines).
  • The existing relative order of segments in the database record does not change. In other words, the existing parent to child relationships cannot change.
  • The existing segment names do not change.
Figure 1. Where segment types can be added in a database record
begin figure description. This figure is described in the surrounding text. end figure description.

To use the reorganization utilities to add a segment type to the database:

Procedure

  1. Determine if the change you are making affects the code in any application programs. If the code is affected, make the necessary changes to the application program.
  2. Unload your database, using the existing DBD.
  3. Code a new DBD. You need to add SEGM= statements to the DBD for the new segment type. No database updates are allowed between unload and reload.
  4. If the change you are making affects the code in application programs, make any necessary changes to the PSBs for those application programs.
  5. Rebuild the ACB if you have ACBs prebuilt rather than built dynamically.
  6. Recalculate database space.
    You need to do this because the change you are making will result in different requirements for database space.
  7. For non-VSAM data sets, delete the old database space and define the new database space. For VSAM data sets, delete the space allocated for the old clusters and define space for the new clusters.
  8. Reload your database, using the new DBD. Make an image copy of your database as soon as it is reloaded.
  9. If your database uses logical relationships or secondary indexes, you must run reorganization utilities before and after reloading to resolve prefix information.
  10. Code and execute an application program to insert the new segment types into the database.