Previous Topic: Considerations for Running REORG on VSENext Topic: Examples


JCL Considerations

The REORG command must be submitted through the batch command facility. The JCL to execute the facility must include statements to define:

If performing parallel processing, do not specify any syntax that would cause the jobs to serialize.

If you define the same DDNAMEs for the source and target database files, the database cannot be unloaded and reloaded in the same job. You must halt processing after the unload phase and then restart processing ensuring that the target files and not the source files are being referenced. Follow these general steps:

Work files can be manually or dynamically allocated. Considering the number of work files needed, the use of dynamic work file allocation is recommended. A CREATE DSMODEL must be coded in the SETUP job, or in the job that allocates the files to use dynamic allocation.

Note: When using CREATE DSMODEL statements, it is recommended that you force the batch command facility to terminate if an error is encountered. You do this by specifying a SET OPTIONS statement with the ON ERROR END clause. By forcing a termination, it ensures that REORG will not execute with incomplete data set models due to an error in a CREATE DSMODEL statement.

When manually allocating work files, you should run a preliminary REORG with the STOP AFTER SETUP option. This produces a report of all required work files. You must allocate these files prior to restarting the REORG process and include the necessary DD statements with DISP=SHR in the JCL that is submitted to restart processing and in the JCL in the RORGJCL file.

The RORGCTL file should be created prior to submitting the first REORG job, unless STOP AFTER SETUP is specified. REORG jobs running in parallel must specify DISP=SHR on this file, or they will serialize with each other on the DSNAME. If processing is stopped after SETUP, the SETUP job can create the file, but subsequent jobs must specify DISP=SHR.

Note: For more information about the generic JCL used to execute the batch command facility, see the chapter for your operating system in this guide.