Previous Topic: JCL ConsiderationsNext Topic: Sample Output


Examples

Example 1

The following example reorganizes the EMPDEMO database. To speed execution, the data is divided into three slices that can be processed in parallel. All work files are dynamically allocated because data set model information is present. Because no STOP AFTER parameter is specified, the reorganization runs to completion.

Create dsmodel w* …
Reorg segment empdemo using empss01
reload into empdemo dmcl newdmcl
divide processing 3 ways
reuse workfile;

Example 2

The following example separates the setup phase from the later phases. After executing setup multiple times, database reorganization is begun using the second REORG statement. Again, work files are allocated dynamically. The SUBMIT directive submits multiple jobs to to process the work in parallel.

Create dsmodel w* …
Reorg segment empdemo using empss01
reload into empdemo dmcl newdmcl
divide processing 3 ways
reuse workfiles
stop after setup;

Reorg submit stop after cleanup;

Example 3

The following example restarts a reorganization that was interrupted by a system failure. It too submits multiple jobs to process the work.

Reorg submit;

Example 4

The following example shows an extra DSMODEL being specified for a DBKEYS file. The DBKEYS file DDNAME starts with WD so it matches on the WD* DSMODEL. The SPACE and BLKSIZE attributes are taken from this model and remaining attributes are taken from the W* DSMODEL because of the FROM syntax. The remaining REORG work files match on the W* DSMODEL and take attributes directly from it.

CREATE DSMODEL W*
DSN 'IDMS.REORG.WORKFILE.&DD'.
UNIT SYSDA
SPACE TRK(5,5)
BLKSIZE 12004
;
CREATE DSMODEL WD*
FROM W*
SPACE TRK(2,2)
BLKSIZE
16000
;
REORG SEGMENT REOGSMAL USING REOGSUB
RELOAD INTO REOGSMAL
DIVIDE PROCESSING 4 WAYS
 STOP AFTER UNLOAD
 CREATE ALL WORKFILES
 GENERATE DBKEYS
NOTIFY 10
;

Example 5

The following example shows the syntax required for a job submitted through RORGJCL. DSMODEL and other options are not coded because they are taken from the control file and are not needed by this job. A job with this syntax can also be submitted manually, and it also uses existing options from the control file and looks for tasks to process.

REORG;