The termination phase for HALDB Online Reorganization
The online reorganization of a HALDB partition terminates after the end of the copying phase, or when IMS encounters an error condition during the reorganization.
You can also stop the online reorganization of a HALDB partition
using the TERMINATE OLREORG command. If multiple
partitions are being reorganized, you can terminate the reorganization
of all of the partitions by specifying an asterisk in the NAME keyword.
After the copying phase is complete for a HALDB partition, the output data sets become the active data sets, and the input data sets become the inactive data sets. The active data sets are used for all data access by IMS application programs. The inactive data sets are not used by application programs, but can be reused for a subsequent online reorganization. Unless you perform an initial load or a batch reorganization reload for the partition, successive online reorganizations for the partition alternate between these two sets of data sets.
IMS updates the partition's
database record in the RECON data sets to reset the cursor-active
status for the partition to reflect that there is now just one set
of data sets. A listing of this record from the RECON data sets shows OLREORG
CURSOR ACTIVE=NO and the ACTIVE DBDS field shows the active
(newly reorganized) data sets. IMS also
updates the online reorganization records in the RECON data sets with
the time stamp of when the reorganization completed.
If you specified the DEL keyword for the INITIATE
OLREORG command (or the UPDATE OLREORG command), IMS deletes the inactive data sets
after resetting the cursor-active status for the partition. Before
deleting the inactive data sets, IMS notifies
all sharing IMS systems, including
batch jobs, that the online reorganization is complete and is recorded
in the RECON data sets. The IMS system
that is performing the online reorganization waits until it receives
an acknowledgment from each of these sharing IMS systems that they have closed and deallocated
the now-inactive data sets, and then it deletes these data sets. However,
if the acknowledgments are not received within 4.5 minutes, the owning IMS system will attempt to delete
the inactive data sets anyway. Without the acknowledgments, the deletion
attempt is likely to fail.
Finally, at the end of the termination phase, IMS updates the RECON data sets to reset the ownership of the online reorganization so that no IMS system has ownership. This resetting of ownership means that any IMS system can perform a subsequent reorganization of the HALDB database.
If online reorganization of a HALDB partition terminates prior
to completion, either because of an error or because you issued the TERMINATE
OLREORG command, you must restart the online reorganization
or perform an offline reorganization for the partition.
The following figure shows the normal processing steps of a successful online reorganization of a HALDB partition. The columns represent the flow of control through the phases of the online reorganization, from the user to IMS, and the status of the data sets as the processing events occur.
