FDRREORG Examples
All examples in this section are found in the JCL library installed with FDR. The member names are EX3011x.
REORG using temporary backups example
The following example can be used to reorganize all “CICSPROD” and “PROD” data sets on any volume with a VOLSER beginning with “CICS” or “PROD” that have split more than 10% of the control areas or more than 20% of the control intervals. The name of the backup data sets is the name of the selected data set appended with “.BACKUP”. Each backup data set is deleted after the selected data set is reorganized.
REORG using permanent backups example
In this run, BACKUP=PERM is used to keep the backup data sets. If FDRREORG is run at a later date with the same control cards, any backup data sets that were kept from a previous run must be deleted first or the data set is not reorganized. FDRREORG does not create a backup using the name of an existing cataloged data set.
REORG using ALWAYSBACKUP example
To combine an application level backup with reorganization, the ALWAYSBACKUP operand can be used. With this operand, all data sets that pass the basic selection criteria are backed up, and any data sets that meet the reorganization criteria are also reorganized. Use of the ALWAYSBACKUP operand requires that the backup data sets be kept. BACKUP=TEMP, if specified or defaulted, is treated as a operand error. In the following example, all “CICSPROD.PAYROLL” and “PROD.PAYROLL” VSAM KSDS data sets or AIXs are backed up. If any data sets are encountered that have a CI or CA split ratio greater than 10, they are reorganized after the backup.
REORG using GDG backups on tape example
This example selects data sets with high-level index of “ACCOUNT” from the catalog. In this run, BACKUP=GDG is used to keep the backup data sets as Generation Data Groups (GDGs). Using this method allows the data sets to be kept without having to delete old backups first. FDRREORG dynamically defines the GDG base record if one does not already exist. The backup files use tape.
//REORG EXEC PGM=FDRREORG,REGION=0M //SYSPRINT DD SYSOUT=* //REORGPRT DD SYSOUT=* //REORGRPT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * REORG BACKUP=GDG,BACKUPUNIT=3590, BACKUPINDEX=++BACKUP SELECT CATDSN=ACCOUNT.**, DSTYPE=VSAM, IFANY, CASPLITR>5,CISPLITR>10 /*
REORG specific data sets example
The following example demonstrates how to select specific data sets for reorganization whether they require reorganization or not. All VSAM, IAM, or PDS data sets with a second index level of “ACCOUNT” is selected from volumes “ACCT01”, “ACCT09”, and “ACCT10”.
//REORG EXEC PGM=FDRREORG,REGION=0M //SYSPRINT DD SYSOUT=* //REORGPRT DD SYSOUT=* //REORGRPT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * REORG NODEFAULTS SELECT DSN=*.ACCOUNT.**, VOL=(ACCT01,ACCT09,ACCT10) /*
REORG VSAM if any splits occur example
The following examples reorganize any VSAM file with an ending index level of “CLUSTER” and have experienced any CI or CA splits.
REORG using NOREORG example
FDRREORG can be used to take application level backups by using the NOREORG option. With this option, all data sets that meet the selection criteria are backed up but not reorganized. Use of the NOREORG option requires that the backup data sets be kept. BACKUP=TEMP, if specified or defaulted, is treated as a operand error. In the following example, all “CICSPROD.PAYROLL” and “PROD.PAYROLL” VSAM KSDS data sets or AIXs are backed up.
REORG using an EXCLUDE example
This example selects data sets starting with “CICSPROD” or “PROD” with the exception of any data sets that have a second level qualifier of PAYROLL. Control cards are processed in the order processed. If the EXCLUDE statement is placed after the SELECT statement, the “CICSPROD.PAYROLL” and “PROD.PAYROLL” data sets are reorganized because they are selected before the EXCLUDE statement is processed. The backup data set name uses the IBM RACF user id as its high level index and goes to the SMS STORCLAS of TEMPDISK.
REORG using CRDAYS example
The following example selects VSAM files with an additional filter limiting the selection to data sets created within the last two days. This might be useful if new data sets were defined with incorrect free space parameters that have been modified to the correct values with an IDCAMS ALTER statement. By reorganizing these data sets, they are reloaded using the new free space parameters.
You could also achieve the same results by using specific dates as shown in the following example. This example also demonstrates how to specify a low and high range for selection.
REORG BACKUP=TEMP,BACKUPUNIT=SYSDA, BACKUPINDEX=++BACKUP SELECT VOL=(CICS*,PROD*), DSN=(CICSPROD.**,PROD.**), DSTYPE=VSAM, CRDATE>=98001,CRDATE<=98002 <---date range or CRDATE>=1998001,CRDATE<=1998002
REORG using last reference data as filters example
The last reference date can also be used as a filter. Use LRDATE= if you want to filter on a specific date. Use LRDAYS= to filter based on days since last reference.
The following example selects partitioned data sets that have been referenced within the last seven days and are more than 80% full. This allows FDR to bypass PDSs that have not been referenced in some time and most likely do not require compression.
Compress PDSs using FDRCOPY for performance example
The following example uses FDRCOPY to compress a large number of PDS data sets. FDRCOPY can be used instead of FDRREORG to compress PDS data sets if the special features of FDRREORG (ex: extra selection criteria, etc.) are not required. FDRCOPY reduces the overhead of compressing large number of data sets yielding optimum performance.
REORG large files to tape small files to DASD example
The following example reorganizes VSAM and IAM files based on default selection criteria. Files 100 cylinders or larger use tape as the backup medium. Files under 100 cylinders use DASD for the backups. Since a large number of volumes are processed, eight sub-tasks are used.
REORG unavailable data sets example
If data sets are in use at the time FDRREORG selects them for processing, they are normally bypassed. In some cases, it might be critical that certain data sets be reorganized before starting an on-line region, or before starting a production job stream. In other cases, the data set might become available before FDRREORG processing is complete. These situations can be handled by using the DSNRETRY= parameter. For data sets that you would like processed if they become available, you can use DSNRETRY=RETRY or DSNRETRY=ENQ. Specifying RETRY instructs FDRREORG to make repeated attempts to allocate the data set during the normal course of processing. If the data set is successfully allocated, it is processed. ENQ instructs FDRREORG to leave pending a SYSDSN enqueue for the data set. This ensures that FDRREORG obtains ownership of the data set as soon as it becomes available. If the data set enqueue is not obtained before the task that selected the data set completes, the pending SYSDSN enqueue is released and the data set is not processed. For those situations where it is critical that data sets be reorganized, you can specify DSNRETRY=WAIT. In this case, the task that selected the data set waits for the SYSDSN enqueue to be obtained and does not terminate until all data sets selected with DSNRETRY=WAIT have been processed. We have added RUNTIME=60 to the REORG statement that instructs FDRREORG to stop processing after 60 minutes. If RUNTIME= was not specified on the REORG statement, or an operator STOP (P) command would have to be issued in the event that a data set queued for retry processing with the wait option is unavailable for a long period of time.
The following example demonstrates how to use the various DSNRETRY= options. The first SELECT statement causes each task to wait for “CICSPROD.” data sets on CICSxx volumes that are not available when selected. The second SELECT statement causes each task to issue a SYSDSN enqueue for “PROD.” data sets on PRODxx volumes that are 1000 cylinders or smaller. These data sets are not processed if they do not become available before the task that selected the data sets completes its processing. The third SELECT statement causes each task to make repeated attempts to allocate “PROD.” data sets on PRODxx volumes that are larger than 1000 cylinders. A SYSDSN enqueue is not issued for these data sets and they are not processed if all allocation attempts are unsuccessful.
Changing the space allocation of a VSAM cluster example
In the following example, the physical allocation of a VSAM cluster is changed. The data component is allocated with 100 cylinders primary and 20 cylinders secondary. The index component is allocated with 5 tracks primary and 1 track secondary.
Moving VSAM data sets example
In the following example, the data and index components of a VSAM cluster are redefined on volume “VSAM01”.
Moving VSAM Data Sets with Alternate Indexes example
In the following example, the data and index components of a VSAM cluster residing on a 3380 are redefined on volume “VSAM01” (a 3390 volume). By specifying MOVEAIX=YES, any Alternate Indexes (AIXs) of this VSAM cluster are also redefined on volume “VSAM01”. If MOVEAIX=YES is not specified, the default is NO and the Alternate Indexes (AIXs) are defined on their original volumes.
Convert a non SMS-managed VSAM cluster to an SMS-managed cluster example
In the following example, a VSAM cluster is redefined as an SMS-managed cluster. The installation ACS routines can override the requested storage class or indicate that the cluster be defined as a non SMS-managed cluster.
Changing the space allocation of an IAM data set example
In the following example, the physical allocation of an IAM data set is changed. The file is allocated with 100 cylinders primary and 20 cylinders secondary.
Moving IAM data sets example
In the following example, an IAM data set is redefined on volume “IAM001”.
Convert a non SMS-managed IAM data set to an SMS-managed data set example
In the following example, an IAM data set is redefined as an SMS-managed data set. The installation ACS routines can override the requested storage class or indicate that the data set be defined as a non SMS-managed data set.
Parallel Mode Reorganization example
In the following example, FDRREORG runs in parallel mode for a multi-volume IAM and VSAM file. A maximum of nine parallel tasks per data set are allowed as specified by the MAXP= operand. If the two data sets are using space on nine or more volumes, 18 tape drives are allocated assuming that the first volume of each data set are not the same.