The AUTOREORG option causes the DASDL compiler to do the following tasks:
-
Instruct the new AUTOREORGDB WFL job to initiate SYSTEM/BUILDREORG after the compilation of the DMSUPPORT and RECONSTRUCT libraries is complete.
-
Compile the Reorganization program.
-
Run the Reorganization program.
Any desired database backup must be done manually. It is recommended that this backup be done before the DASDL compilation and again after the reorganization is complete. Also, the database must be closed prior to starting the DASDL compilation. Once the reorganization starts, the database can be opened again.
Situations That Can Occur When Using the AUTOREORG Option lists different situations that can occur when using the AUTOREORG option. Text is provided that explains how each situation should be handled.
Table 17. Situations That Can Occur When Using the AUTOREORG Option
Situation |
Action |
---|---|
Changes to existing structures require a reorganization, and no new structures have been added. |
Initiate a BUILDREORG run with a single UPDATE parameter. The control file is automatically updated by the Reorganization program. |
Changes to existing structures require a reorganization, and a new data set has been added. |
Initiate a BUILDREORG run with a single UPDATE parameter. The new data set and its set or subsets are implicitly created. |
Changes to existing structures require a reorganization, and sets or subsets have been added. |
Initiate a BUILDREORG run with an UPDATE parameter and with the appropriate GENERATE parameters. |
There are no database changes requiring a reorganization, but a new set or subset has been added to an existing data set. |
Initiate a BUILDREORG run without an UPDATE parameter but with the GENERATE parameters. Also use the DMCONTROL option to update the control file. |
There are no database changes that require a reorganization, but a data set has been added. |
Initialize the files. In this case, the initialize statement causes the new files to be created. |
If you need to add such statements as COPY BACK, SEQUENCE, or TASKLIMIT to the BUILDREORG parameters, you must reset the ZIP compiler control option, use CANDE to modify the DMAUTOREORG parameter file, and then manually start the AUTOREORGDB WFL job. This WFL job is called DATABASE/WFL/AUTOREORG.
If the ZIPFILE option is included and the AUTOREORG option is set, the ZIPFILE must specify the name of the AUTOREORG WFL job. However, if no reorganization is required, the ZIPFILE option can specify the COMPILEDB WFL job. If the ZIPFILE option is not included, DASDL determines the correct WFL job to use. However, if the ZIPFILE option is included and specifies the wrong WFL job for the situation, a syntax error occurs.