Unloading the existing database

Unload the existing databases by using the HD Reorganization Unload utility (DFSURGU0) with the appropriate control statement.

The control statements you can use with the DFSURGU0 utility include:

  • If your logically related databases do not use secondary indexes, use the MIGRATE=YES control statement.
  • If your logically related databases use secondary indexes, use the MIGRATX=YES control statement to create unload files for the secondary indexes. You must also complete the steps documented in Converting HDAM or HIDAM databases with secondary indexes to HALDB.

When you unload a database for conversion to HALDB that has a logical child, its logically related database might also be read. The HD Reorganization Unload utility reads the logically related database when any of the following conditions exists:

  • The logical relationship uses physical pairing.
  • The VIRTUAL option is specified (the logical parent's concatenated key is not stored in the logical child).
  • The logical relationship uses symbolic pointing.
  • The database that is being unloaded contains the virtual logical child.

Stated another way, there are only two cases in which the logically related database is not read. They are:

  • The database that is being unloaded contains the real logical child of a virtually paired relationship that uses direct pointing, and the logical parent's concatenated key is stored in this logical child.
  • The logical relationship is unidirectional and uses direct pointing, and the logical parent's concatenated key is stored in the logical child.

When the HD Reorganization Unload utility reads the logically related database, either the logical parent or the paired logical child of each logical child is read. That is, each instance of a logical relationship requires a read of the related data. These reads are random. Each read might require a physical I/O, which can greatly increase the elapsed time of the unload.

You must provide buffer pools for any logically related database that is read by the unload. The DFSVSAMP DD statement for the HD Reorganization Unload utility must include definitions for these buffers.

The following figure illustrates a migration of two logically related databases to HALDB databases.

Figure 1. Migrating databases with logical relationships
begin figure description. Two logically related databases are unloaded by separate unload jobs. Each unload process reads both databases and saves output files on DASD or tape. Two separate load jobs read the output files and load two HALDB databases independently of each other. end figure description.