FDRCOPY REORG Examples
All examples in this section are found in the JCL library installed with FDR. The member names are EX3032x.
Reorganize one PDS example 1
A single PDS is reorganized. Its volume is extracted from the catalog. All member names are listed showing which were moved.
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
REORG TYPE=DSF
SELECT CATDSN=USER1.JCL.CNTL,LIST=YES
/*
Reorganize One PDS example 2
This is a cataloged procedure that can be used to reorganize one or more PDSs.
The PDS name or a filter name is a symbolic parameter to the PROC. The FDRCOPY control statements are passed in the EXEC statement PARM, so SYSIN is a DUMMY data set.
//REORG EXEC PGM=FDRCOPY,REGION=0M,
// PARM='REORG TYPE=DSF/SELECT CATDSN=&PDS’
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD DUMMY
// PEND
Example: To reorganize all data sets with a high-level index of “USER1” and a last index level of “LOAD” specify:
To duplicate the first example with this PROC, use:
Reorganize PDSs on specified volumes example
All PDSs on volumes starting with “TSO” are reorganized. Data sets currently allocated to another job or user are bypassed.
//REORG EXEC PGM=FDRCOPY,REGION=0M
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
REORG TYPE=DSF
SELECT DSN=**,VOL=TSO*
Reorganize many PDSs example
A number of cataloged PDSs, which may be on many volumes, are reorganized. MAXCARDS= is specified in case over 250 data sets are selected. Data sets currently allocated to another job or user are bypassed. Member names are listed for all JCL libraries.
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
REORG TYPE=DSF,MAXCARDS=1000
SELECT CATDSN=**.CNTL
SELECT CATDSN=**.JCL,LIST=YES
SELECT CATDSN=PROD.**
/*
Reorganize active PDSs example
REORG normally bypasses data sets that are enqueued (in use) by another job or user, but that enqueue is by data set name, not volume serial. This job reorganizes PDSs on an alternate SYSRES volume even though a data set by the same name is in use on the active SYSRES volume.
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
REORG TYPE=DSF,ENQERR=PROCESS
SELECT DSN=SYS**,VOL=ALTRES
/*
Simulate reorganization example
A simulated reorganization of all PDSs on all online volumes is done. Since FDRCOPY cannot determine the results of the reorganization without knowing the contents of the PDS, each selected PDS is read, but all writes are bypassed and no PDS is changed.
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSIN DD *
SIMREORG TYPE=DSF
SELECT DSN=**,VOL=*
/*