Examples of how to code the RECYCLE command

The following examples present different ways to code the RECYCLE command.

Note: Any values specified here are only examples and should not be interpreted as the values to be used for your system.

Recycling all volumes, do not check the first volume in a connected set for percent valid criteria

In this example, this command recycles all eligible backup and migration volumes. It also requests that DFSMShsm not check that the first volume in a connected set meet the percent valid criteria as long as the average percent valid for all volumes in the connected set meets the percent valid criteria.
   RECYCLE ALL EXECUTE CHECKFIRST(N)  PERCENTVALID(25)
   RECYCLE PERCENTVALID(25) CHECKFIRST(N)

Displaying a list of all eligible tape daily backup volumes

In this example, a formatted list is printed of all tape daily backup volumes that contain 5% or less valid data and are eligible for recycling. Volumes that have 0% valid data are not listed because they do not need to be pulled for a subsequent recycle.
   RECYCLE DISPLAY DAILY PERCENTVALID(5)

Recycling tape spill volumes

In this example, DFSMShsm recycles all tape spill backup volumes that contain 25% or less valid data and are eligible for recycling.
   RECYCLE EXECUTE SPILL PERCENTVALID(25)

Recycling tape migration level 2 volumes

In this example, DFSMShsm recycles all tape migration level 2 volumes that are eligible for recycling. DFSMShsm uses the value specified with the SETSYS ML2RECYCLEPERCENT command to determine the percent valid criteria. If the SETSYS ML2RECYCLEPERCENT is not specified, DFSMShsm uses the value specified with the SETSYS RECYCLEPERCENT command.
   RECYCLE EXECUTE ML2

Recycling a specific tape volume

In this example, a specific tape volume is recycled. DFSMShsm does not check the percentage of valid data on the volume or whether the volume is full before it recycles the volume.
   RECYCLE EXECUTE VOLUME(BATP01)

Recycling a tape volume with known errors

In this example, a specific tape volume with known errors is recycled.
   RECYCLE VOLUME(TAP230) FORCE EXECUTE

Displaying a list of both daily and spill backup tapes

In this example, a list of both daily and spill backup tapes that are already empty but have not yet been returned to scratch is displayed.
   RECYCLE BACKUP DISPLAY PERCENTVALID(0)

Recycling a limited number of backup tapes

In this example, DFSMShsm recycles both daily and spill backup tapes and it quiesces the RECYCLE process when 150 tapes have been returned to scratch. The messages generated during the RECYCLE processing are written to the requested output data set.
   RECYCLE BACKUP EXECUTE LIMIT(150) OUTDATASET(C253800.RECYCLE.OUTPUT)

Producing a list of tape volume serials before recycling those volumes

In this example, DFSMShsm produces a list of tape volume serials in a pull list format and a mount list format. An operator can transport 100 tapes on each cart and a total of 500 tapes is requested. The list of tape volume serials is written to the output data set prefixed by the requested data set name. After the tapes have been collected, the tape operator can reply "Y" to the ARC0825D message. Then RECYCLE begins to process those tape volumes.
   RECYCLE BACKUP EXECUTE TAPELIST(PULLSIZE(100) TOTAL(500) PREFIX(REMOTE))

Another example of producing a list of tape volume serials before recycling those volumes

In this example, DFSMShsm produces a list of tape volume serials in both pull list format and mount list format. The PULLSIZE default of 40 is used. All connected sets whose percent valid is not greater than 75% are listed. The list is written to the output data set with a prefix of 'A'.

Note: This example is used to illustrate outputs. We would not expect you to use this command with a PERCENTVALID percentage of 75%.
RECYCLE ALL EXECUTE TAPELIST(PREFIX(A)) PERCENTVALID(75)

The following is a sample listing of the output data set. For this example, the pull list and the mount list for only ML2 volumes are shown.

 OUTPUT LIST DATASET: A.ML2.D1996109.T093226
 LEGEND:
 '*' INDICATES EMPTY TAPE, '-' INDICATES CONTINUATION FROM OR TO
 DFSMSHSM RECYCLE PULL LIST FROM 0.0% TO 0.0%
  *555060   *555075   *555100   *555222   *555990   *555995

 DFSMSHSM RECYCLE PULL LIST FROM 0.8% TO 49.9%
   555001    555003    555004    555005    555006    555007    555008    555009
   555011    555012    555013    555014    555015    555016    555017    555018
   555019    555022    555026    555027    555028    555029    555031    555032
   555034    555035    555036    555037    555038    555040    555041    555042
   555043    555044    555045    555046    555047    555048    555049    555050

 DFSMSHSM RECYCLE PULL LIST FROM 51.4% TO 57.3%
   555021    555023    555024    555039    555115    555116    555117    555118
   555119    555120
 END OF DFSMSHSM RECYCLE PULL LIST
Note:
  1. The volumes listed in the 0.0% to 0.0% section are empty and will not be mounted
  2. The volumes listed in the 0.8% to 49.9% section represent the pull default size of 40 volumes. The volumes are listed in collating sequence to simplify locating them in tape storage.
 DFSMSHSM RECYCLE MOUNT LIST FROM 0.0% TO 57.3%
  *555060   *555075   *555100   *555222   *555990   *555995    555011    555007
   555004    555032    555012    555035    555048    555015    555001    555044
   555042    555045    555008    555034-  -555029    555009    555028    555038
   555040    555018    555006    555049    555005    555041    555046    555037
   555026    555036    555047    555016    555022    555017    555013    555050
   555031    555019    555003    555027    555014    555043    555024    555039
   555119-  -555120-  -555118-  -555117-  -555116-  -555115    555023    555021
 END OF DFSMSHSM RECYCLE MOUNT LIST
Note:
  1. The volume 555015 needs a different device type than the other volumes. It will not be requested after volume 555048, instead volume 555015 will be requested at a later time, when a new drive allocation is performed.
  2. When attempting to recycle connected set 555034—555029, an open error occurred on 555034 causing the connected set to fail recycle processing. A mount for 555029 will not be attempted.
  3. The connected set 555119–555120–555118–555117–555116–555115 consisted of more than 5 volumes. This connected set will not be mounted on an already mounted drive, independent of the SETSYS RECYCLEINPUTDEALLOCFREQUENCY setting, but will be skipped until a new drive allocation is performed.

Converting current media tapes to a newer tape media

In this example, the SELECT parameter is used to specify a selection filter for RECYCLE processing. For this example, assume the current media to be 3490 tapes and the newer media to be 3590 tapes. Also assume that the 3490 tapes all have volsers in the range of A00000 through A39999 and 3590 tapes all have volsers in the range of B00000 through B39999.

You can use the INCLUDE parameter to specify a range of tapes to RECYCLE that are 3490 tape media by entering the following command:
   RECYCLE ALL EXECUTE SELECT(INCLUDE(RANGE(A00000:A39999))) PERCENTVALID(100)
Or, you can use the EXCLUDE parameter to specify a range of tapes to exclude from RECYCLE processing that are 3590 tape media by entering the following command:
   RECYCLE ALL EXECUTE SELECT(EXCLUDE(RANGE(B00000:B39999))) PERCENTVALID(100)

Selecting connected tapes for RECYCLE using the SELECT parameter

In this example, three ways to use the SELECT parameter when selecting connected sets for RECYCLE processing are shown. For this example, assume that there are only three connected sets:
  • Set A consists of TAPE01 and TAPE09
  • Set B consists of TAPE02 and TAPE04
  • Set C consists of TAPE03, TAPE05, and TAPE10
In this example, you want to recycle only sets A and C. To recycle connected sets A and C using the SELECT INCLUDE parameters, enter the following command:
   RECYCLE ALL EXECUTE SELECT(INCLUDE(RANGE(TAPE01:TAPE03,TAPE05:TAPE10)))

Although TAPE02 from set B is included in the range, TAPE04 is not included in the range and this makes set B ineligible for RECYCLE processing.

To recycle connected sets A and C using the SELECT EXCLUDE parameters, enter the following command:
   RECYCLE ALL EXECUTE SELECT(EXCLUDE(RANGE(TAPE02:TAPE02)))

Because TAPE02 is specified as the range to exclude and because TAPE02 is part of the connected set B, set B is excluded from RECYCLE processing.

To recycle connected sets A and C using both the SELECT INCLUDE and EXCLUDE parameters, enter the following command:
   RECYCLE ALL EXECUTE SELECT(INCLUDE(RANGE(TAPE01:TAPE10)) +
                       EXCLUDE(RANGE(TAPE04:TAPE04)))

Connected set B is not eligible for RECYCLE processing because TAPE04 is specifically excluded.

Selecting single tapes for RECYCLE using the SELECT parameter

In this example, the SELECT parameter is used to select a list of single volumes for RECYCLE processing. To recycle volumes A, J, and Q, enter the following command:
   RECYCLE ALL EXECUTE SELECT(INCLUDE(RANGE(A:A,J:J,Q:Q)))