Overview of the Reorg function


With the Reorg function, the input (disorganized) database and the output (reorganized) database use different data sets.

A segment is unloaded by the Unload function and is passed directly to the Reload function for reload unless you specify the OLDDBD keyword. For more information, see OLDDBD.

The index maintenance records, if any, are passed to the Index Build function. This process continues for each segment. The Index Build function sorts the index records and creates the index databases. You can take an image copy of the database as it is reorganized.

The Reorg function automatically invokes the prefix resolution and update function if the database has logical relationships. (For limitations, see Reorg-function.)

The term standard reorganization refers to a reorganization where you use the database, rather than an HD Unload file, as input. To execute a standard Reorg function reorganization, specify INPUT(DB) or accept it as the default.

Figure 1 shows the system flow for the Reorg function.

Figure 1. Reorg function system flow

GUID-8904B561-0C05-46DA-BC2F-5A9024E3E81E-low.png

Figure 2 shows the input and output processes of a standard Reorg function reorganization.

Figure 2. Inputs and outputs of standard Reorg function reorganization

GUID-F1D81E9C-16B4-47B3-886C-7B1A24881ACA-low.png

Table 1 lists the names that are recognized by the Reorg function in a standard reorganization. It shows the relationship between input names (from the disorganized database) and output names (for the reorganized database).

Table 1. ddnames and data set names

Names

Input (to the Unload function)

Output (from the Reload function)

ddnames

ddnames defined with the UNLDD or UNLDDLST keywords or dynamically allocated

DBD ddnames

Data set names

Disorganized primary index and database data set names (the names registered to DBRC)

No secondary indexes are used as input.

Reorganized primary index and database data set names

Old or new secondary index data sets:

  • Old data set names are excluded from swapping, and you cannot have read access during reorganization.
  • New data set names are swapped, and you can have read access during reorganization.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*