The REORG control statement performs maintenance functions on the database; it can be run in asynchronous or non - asynchronous mode.
A standard (stand-alone) SARDBASE/REORG must not be run against the
database unless there is a performance problem accessing reports lists. Problems that required a standard (stand-alone) SARDBASE/REORG in previous releases of
are effectively eliminated in the current release.
Under normal operating conditions,
constantly reorganizes an index block when adding or deleting index entries but there are Master Index records which are used to improve performance; these are not maintained by the backup cycle and might require a periodic asynchronous database reorganization. The conditions which occur are the gradual growth of "Total used blocks," "Total records," and "Percent utilization" without an apparent growth in the number of SYSOUTs.
The number of index records has increased from previous releases -- these records help improve the performance of functions such as the backup cycle.
We recommend that a SARDBASE/REORG ASYNC be run on a scheduled basis -- once a month or more based on database activity. If large numbers of blocks are freed during the reorganization, the schedule frequency might need be shortened.
A REORG of a database does the following:
  • Defragments the index
  • Builds a queue of empty, reusable index blocks
  • Incorporates the empty blocks from the queue again
  • Rebuilds the alternate index (used for online selection by DATE)
The high-level name of the database to be reorganized must have been defined with the NAME control statement (or the PARM parameter of the EXEC JCL statement).
specifies one of the following:
    A stand-alone reorganization of the index file is to be performed with the database reserved for the duration of the reorganization
    This is the default.
    A standalone reorganization of the index file is to be performed without placing a reserve on database
    Specify NORESERVE only if you can be certain that no one else could be updating the database while the REORG operation is proceeding.
    An asynchronous reorganization of the index file is to be performed
    Others can actively use the database during the reorganization; however, the less database activity there is, the faster the REORG runs.
The standalone REORG requires space to hold the newly reorganized index as the old index. Upon successful completion of the standalone REORG, the space used by the old index is freed. The ASYNC REORG does not require any additional space to reorganize the index.
Terminating a REORG
The standard and asynchronous REORG can be prematurely terminated with a stop MVS operator command.
P jobname,STOP
F jobname,STOP
The job name on the stop command references the MVS job name executing the SARDBASE utility.
  • When the standard REORG is stopped, the full reorganization process is aborted and the database is reset to the pre-reorganization state.
  • The asynchronous REORG, however, is stopped in a manner that leaves the previous reorganization activity intact.
Obtaining REORG Status
The SARDBASE REORG facility also supports a status command using the modify MVS operator command:
F  jobname,STATUS
The status command issues messages to the operator console, describing the state and location of reorganization process.