z/OS DFSMSdss Storage Administration
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Deleting unwanted data sets

z/OS DFSMSdss Storage Administration
SC23-6868-01

You can use the DELETE and PURGE keywords and data set filtering with a physical data set dump to delete unwanted data sets from DASD.

Note: This does not apply to VSAM data sets, multivolume non-VSAM data sets, or migrated data sets.

On a logical data set dump when using the DELETE keyword, VSAM, non-VSAM, and multivolume data sets are deleted. DFSMSdss cannot be used to delete migrated data sets.

The following steps show how to delete (scratch and uncatalog) all data sets that have expired and all data sets that have not been referred to in the last year. The data sets are not actually moved to a dump volume.

  1. JCL requirement:
     //NOTAPE DD DUMMY

    The above JCL prevents moving any data sets.

  2. Issue the following control statements to delete (scratch and uncatalog) all data sets not referred to in the last year:
    DUMP INDD(VOL111) OUTDD(NOTAPE) -
       DATASET(BY(REFDT,LE,*,-366)) -
       DELETE PURGE
  3. Issue the following control statements to delete all expired data sets:
     DUMP INDD(VOL111) OUTDD(NOTAPE) -
       DATASET(INCLUDE(**) -
       BY(EXPDT,LT,*)) -
       DELETE
    Note: You can modify the above example to apply to VSAM and multivolume data sets by omitting the INDD statement or by specifying LOGINDD. This JCL results in a logical data set dump operation.
  4. Issue the following control statements to delete uncataloged non-VSAM data sets.
    • For a physical data set dump:
      DUMP DATASET(INCLUDE(**) -
         BY((DSORG NE VSAM) -
         (CATLG EQ NO))) -
         INDDNAME(DASD1,DASD2) -
         OUTDDNAME(TAPE) -
         DELETE PURGE
      Note: The DD named TAPE can be a DD dummy if a dump of the uncataloged data sets is not wanted. DASD1 and DASD2 identify the input volumes. Because a physical data set dump processes each volume in order one at a time, it can handle multiple, uncataloged, single-volume data sets with the same name when multiple input volumes are specified. It cannot handle a multivolume data set even if all the volumes on which it resides are specified as input volumes.
    • For a logical data set dump:
      DUMP DATASET(INCLUDE(**) -
         BY((DSORG NE VSAM) -
         (CATLG EQ NO))) -
         LOGINDDNAME(DASD1,DASD2) -
         OUTDDNAME(TAPE) -
         DELETE PURGE
      Note: The DD named TAPE can be a DD dummy if a dump of the uncataloged data sets is not wanted. DASD1 and DASD2 identify the input volumes. A logical data set dump cannot handle multiple, uncataloged data sets with the same name in the same job even when all the volumes on which they reside are specified as input volumes.

      A logical dump can handle a legitimate multivolume uncataloged data set if all the volumes on which it resides are specified as input volumes and if there is no cataloged data set by the same name on the system.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014