FDRCOPY REORG Statement
REORG statement syntax
REORG|SIMREORG | |
---|---|
TYPE=DSF | |
,DSNENQ=HAVE|NONE|USE | |
,ENQERR=BYPASS|PROCESS | |
,ENQERR=NO | |
,MAXCARDS=250|nnnnn | |
,MAXERR=20|nnnn | |
,SELTERR=NO|YES |
FDRCOPY REORG
PDS reorganization can also be invoked directly under program FDRCOPY. See the examples in FDRCOPY-REORG-Examples for the JCL required.
REORG statement
The REORG statement invokes FDRCOPY PDS reorganization (compression in-place), similar to the PDS compression of IEBCOPY, but with 50% to 90% less elapsed time and similar reduction in other resources used. For all DSORG=PO (partitioned) data sets selected, REORG relocates all active members toward the beginning of the data set, leaving the maximum amount of unused space at the end of the PDS for new and updated members. An unlimited number of PDSs may be reorganized in execution of FDRCOPY from any number of DASD volumes.
SIMREORG statement
The SIMREORG statement simulates the operation of the REORG statement. SIMREORG must still read the input data sets to determine member location, but WRITEs are simulated and the data sets are not modified. SIMREORG reports on all selected data sets, indicating the number of tracks that a real REORG reclaims.
Licensing requirements
Although REORG is part of FDRCOPY, the REORG function is enabled only if your installation is licensed for FDRREORG, a separately-priced component of FDR.
FDRREORG reorganizes VSAM data sets, Innovation Access Method (IAM) data sets, and PDSs (using FDRCOPY for the PDS reorganization). If you execute PDS reorganization through FDRREORG, it enhances the reorganization process by providing additional selection criteria, retrying unavailable data sets, etc. However, these enhancements may add additional overhead; executing FDRCOPY REORG directly provides the fastest PDS reorganization.
REORG statement operands
Required. Specifies that this is a data set operation.
Specifies whether all of the data sets selected for reorganization are enqueued. See Data Set Enqueue Option in Compacting-Active-Volumes for more details.
If the enqueue fails on an data set, meaning that some other task has the data set enqueued, an FDR158 warning message is issued for the data set and it is bypassed unless the ENQERR=PROCESS operand is specified. A successful enqueue prevents any other task from using the data set until the reorganization is complete. An enqueue failure is considered an error unless ENQERR=NO is specified, but other data sets are still reorganized. The options for DSNENQ= are:
The data sets are enqueued for the duration of the reorganization on this DASD volume. If not available, a message FDRW27 is issued to the operator. See Compacting-Active-Volumes for the valid responses.
No data set enqueue is issued.
The data sets are only tested to see if they are enqueued to another task at the time that the reorganization on this volume starts.
The data sets are enqueued for the duration of the reorganization from this DASD volume. This is the most frequently used option and is the default for FDRCOPY.
Default: USE.
If the DSNENQ= operand is used to request data set enqueues, an enqueue failure (in-use data set) is not considered an error (see Step Termination). Use ENQERR=NO if you want messages about active data sets but want the step to terminate normally.
Default: A DSNENQ failure is considered an error and causes a condition code or abend at step termination. This is to call attention to the error.
Specifies processing if the DSNENQ= option finds that an input data set is in use (enqueued):
Do not reorganize an active data set.
Reorganize a data set even if it is active (a warning message is still produced).
Default: BYPASS.
nnnnn
Accept additional SELECT/EXCLUDE statements (over 250).
Default: 250 statements.
nnnn
Specifies the number of read or write errors (1 to 9999) that, if reached, cause the operation to abend. Read and write errors are counted separately, but MAXERR= specifies the maximum for each counter. Each error is indicated by a message and possible mini-dump.
Default: 20.
Specifies what happens at step termination if FDRCOPY finds that a SELECT or EXCLUDE statement was never referenced (no data set on any DASD was selected by the statement).
A condition code or abend is not to be issued at step termination. You might use SELTERR=NO when you expect some unmatched SELECT or EXCLUDE statements, perhaps because some data sets may not exist.
A condition code or abend is issued at step termination to call attention to a possible control statement error.
Default: YES, unless overridden in the FDR Global Options (see SELTERR).