Managing DMSII Changes to Record Layout

Use this procedure if a DMSII reorganization changes the layout of records. DMSII record layouts are changed in the following circumstances:

  • Record format conversion (also called structural reorganization in this section)
  • Filler substitutions

When DBEngine notifies the DATABridge Client that the layout of records have changed, the DATABridge Client returns a message for each reorganized data set and then prompts you to run a redefine command followed by a reorg command. It then returns an exit_status value of 2 (DMSII reorganization). The redefine command can determine whether the layout for the data tables have been affected by the DMSII layout change and if the affected data sets need to be recloned. (For more information about the redefine command does, see About the redefine Command.)

To run the redefine command

  1. If the DMSII changes are extensive or complex, we recommend that you back up the relational database before proceeding.
  2. If you use the Client Configurator to customize the table layouts, skip steps 1 through 3 and run the Client Configurator instead. It will perform the same actions as the redefine command, but will also allow you to make customizations.
  3. Modify user scripts as required by the host layout changes.
  4. Run the redefine command as follows:

    dbutility redefine datasource

    Important: If any changes caused by the reorganization are not supported, the redefine command does not create the reorganization scripts. Instead, it sets ds_mode to DBV_MODE_CLONE(0), which forces the data set to be recloned. If the changes caused by the reorganization are allowed, the redefine command sets ds_mode to DBV_MODE_NEEDREORG (31).

  5. If the redefine command results in errors because the user scripts were improperly updated, run a reload command. This restores the control tables using the unload file that is automatically generated when you run the redefine command. Correct the user scripts and rerun the redefine command until no errors result.
  6. Examine the reorg scripts created by the redefine command (or Client Configurator) to make sure they are correct before proceeding any further. These scripts are created in the working directory and have names of the form script.reorg_nnn.tablename, where nnn is the old update level of the DMSII database.
  7. Run the reorg command as follows:

    dbutility reorg datasource

    The reorg command does the following:

    • Generates new Client scripts for all data tables whose layouts have changed.
    • Restores ds_mode to its value before the reorganization for all data sets whose relational database tables were successfully updated by the reorganization scripts. A ds_mode of 2 (or 1) indicates that the data set is ready to be updated.
    • Sets ds_mode to 33 for the data sets whose relational database tables failed to update with the reorganization changes. You must manually update these tables to match the new layout that resulted from the DMSII reorganization. This will cause the reorg command to stop; you must fix the problem in the script, set the ds_mode of the failed data set back to 31, and rerun the reorg command. The data sets that were successfully reorganized will not be reprocessed as their ds_mode columns no longer have values of 31.
  8. Run a process command to resume change tracking:

    dbutility process datasource