Examples of how to code the EXPIREBV command

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

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

Displaying backup versions within a key range that qualify for deletion

In this example, a starting message is issued to the user. An output line is directed to SYSOUT class H for every SMS backup version that qualifies for deletion. All SMS backup versions with key ranges from A000 to L888 are processed. Deletion qualification is determined by the SMS management class attributes for each data set as they are defined for that data set. No deletions are performed and no non-SMS processing is done. An ending message is issued to the user.
   EXPIREBV DISPLAY STARTKEY(A000) ENDKEY(L888) SYSOUT(H)

Deleting SMS backup versions and specific non-SMS versions that qualify for deletion

In this example, a starting message is directed to the backup activity log and to the user. DFSMShsm attempts to delete all SMS backup versions that qualify for deletion. An ARC0734I message is directed to the backup activity log under the control of the SETSYS ACTLOGMSGLVL. Deletion is determined by the SMS management class attributes as they are defined for each data set.

DFSMShsm processes all retired versions of non-SMS data sets. DFSMShsm attempts to delete all retired versions and associated cataloged backup versions which are over 100 days old. An ARC0734I message is written to the backup activity log under control of the SETSYS ACTLOGMSGLVL command. An ending message is directed to the backup activity log and to the user.
   EXPIREBV EXECUTE NONSMSVERSIONS(DBU(100))

Displaying SMS backup versions and non-SMS cataloged versions that qualify for deletion

In this example, a starting message is directed to the user. DFSMShsm processes all SMS backup versions. An output line is directed to SYSOUT class A for each backup version that qualifies for deletion. Deletion is determined by the SMS management class attributes as they are defined for each data set.

An output line is directed to SYSOUT class A for all non-SMS backup versions of deleted data sets that have been cataloged and more than five days have elapsed since EXPIREBV determined that the data set was deleted. DFSMShsm does not perform any deletions. An ending message is directed to the user.
   EXPIREBV DISPLAY NONSMSVERSIONS(CATALOGEDDATA(5))

Displaying, in an output dataset, the SMS backup versions and non-SMS uncataloged versions that qualify for deletion

In this example, a starting message is directed to the user. DFSMShsm processes all SMS backup versions. An output line is directed to the output dataset for each backup version that qualifies for deletion. Deletion is determined by the SMS management class attributes as they are defined for each data set.

DFSMShsm processes all uncataloged backup versions, and an output line is directed to the output dataset for each uncataloged backup version that is over 10 days old, thereby qualifying for deletion. DFSMShsm does not perform any deletions. An ending message is directed to the user.
   EXPIREBV DISPLAY NONSMSVERSIONS(UNCATALOGEDDATA(10)) ODS(DSNAME)

Resuming deletion of SMS backup versions that qualify following release of a previously held EXPIREBV command

In this example, EXPIREBV processing had been held, with the HOLD EXPIREBV command, before a prior EXPIREBV command had finished. Later, EXPIREBV processing was released by issuing the RELEASE EXPIREBV command and then resumed by issuing the EXPIREBV RESUME EXECUTE command.
   EXPIREBV RESUME EXECUTE

A starting message is directed to the backup activity log and the user. Processing begins where the prior EXPIREBV command left off and continues to the ENDKEY specified in the prior command. If no ENDKEY is specified, processing continues to the end of the BCDS.

DFSMShsm attempts to delete all SMS backup versions that qualify for deletion. An ARC0734I message is directed to the backup activity log under the control of the SETSYS ACTLOGMSGLVL. Deletion is determined by the SMS management class attributes as they are defined for each data set.

No non-SMS backup versions are processed. An ending message is directed to the backup activity log and the user.

Sample of a printer listing when you specify EXPIREBV ABARSVERSIONS with the DISPLAY parameter

Figure 1 is a sample of a printer listing when you specify EXPIREBV ABARSVERSION with the DISPLAY parameter.

Figure 1. Sample Printer List of Data Sets When You Specify EXPIREBV ABARSVERSIONS and DISPLAY
DISPLAY OF ABARS VERSIONS ELIGIBLE FOR EXPIRATION AT 18:21:50 ON 1992/08/25 FOR 381A

COMMAND INPUT: ABARSVERSIONS AGNAME(PAY1) RETAINVERSIONS(0000)

SUBMITTER'S USERID: **OPER-

AGNAME = PAY1                           VERSION = 0001

  AGGREGATE VERSION KEY = PAY1.1992238000101                           DELETED*
  (* DETERMINED ON 1992/08/25)

    AGGREGATE GROUP FILES                         FILE STATUS
    PAY1.C.C01V0001                               NOT IN CATALOG
    PAY1.D.C01V0001                               NOT IN CATALOG
    PAY1.O.C01V0001                               NOT IN CATALOG

AGNAME = PAY1                           VERSION = 0002

  AGGREGATE VERSION KEY = PAY1.1992238000201                           DELETED*
  (* DETERMINED ON 1992/08/25)

    AGGREGATE GROUP FILES                         FILE STATUS
    PAY1.C.C01V0002                               UNCATALOGED
    PAY1.D.C01V0002                               UNCATALOGED
    PAY1.O.C01V0002                               UNCATALOGED

     END OF DISPLAY - 00000002 ABARS  VERSIONS ELIGIBLE FOR EXPIRATION

Sample of a printer listing when you specify EXPIREBV with the DISPLAY parameter

Table 1 presents the header information when you specify EXPIREBV and DISPLAY.

Table 1. Headings of Output When You Specify EXPIREBV and DISPLAY
Printer Output Heading Description
SYS CAT YES indicates that the backup version was made from a cataloged data set.
GEN NMBR This field contains the generation number of the backup version. The most recent backup version is 0, the next most recent is 1, and so forth.
AGE This is the number of days between the creation of the backup version and the execution of the EXPIREBV command.
RET VERS YES indicates that the version being listed is a retired version. NO indicates that the version is not a retired version.
BACK PROF YES indicates that a RACF® discrete backup profile exists. NO indicates that a RACF discrete backup profile does not exist.
Figure 2 is a sample of a printer listing when you specify EXPIREBV with the DISPLAY parameter. Each data set listed is deleted if the same EXPIREBV command is issued with the EXECUTE parameter.
Figure 2. Sample Printer List of Data Sets When You Specify EXPIREBV and DISPLAY
DISPLAY OF BACKUP VERSIONS ELIGIBLE FOR EXPIRATION AT 05:44:14 on 1991/01/07 for SYSTEM=3081

COMMAND INPUT:  STARTKEY(M734413.F240BV09.N02.NAME44.XXX.NAMEIS44.BYT) ENDKEY(M734413.F240BV09.N04.NAME44.XXX.NAMEIS44.BYT)

DSNAME = M734413.F240BV09.N02.NAME44.XXX.NAMEIS44.BYT NOW CATALOGED, AS SMS
MANAGEMENT CLASS USED = DEFAULT1

BACKUP VERSION DSNAME                        SYS  GEN       RET  BACK
                                             CAT  NMBR AGE  VERS PROF
DFHSM.BACK.T074205.M734413.F240BV09.H7001    YES  003  006  NO   NO
DFHSM.BACK.T214205.M734413.F240BV09.H7001    YES  002  006  NO   NO
DFHSM.BACK.T534105.M734413.F240BV09.H7001    YES  004  006  NO   NO
DFHSM.BACK.T464205.M734413.F240BV09.H7003    YES  001  004  NO   NO

DSNAME = M734413.F240BV09.N03.NAME44.XXX.NAMEIS44.BYT NOW CATALOGED, AS SMS
MANAGEMENT CLASS USED = DEFAULT1

BACKUP VERSION DSNAME                        SYS  GEN       RET  BACK
                                             CAT  NMBR AGE  VERS PROF
DFHSM.BACK.T094205.M734413.F240BV09.H7001    YES  003  006  NO   NO
DFHSM.BACK.T234205.M734413.F240BV09.H7001    YES  002  006  NO   NO
DFHSM.BACK.T554105.M734413.F240BV09.H7001    YES  004  006  NO   NO
DFHSM.BACK.T474205.M734413.F240BV09.H7003    YES  001  004  NO   NO

DSNAME = M734413.F240BV09.N04.NAME44.XXX.NAMEIS44.BYT NOW CATALOGED, AS SMS
MANAGEMENT CLASS USED = DEFAULT1

BACKUP VERSION DSNAME                        SYS  GEN       RET  BACK
                                             CAT  NMBR AGE  VERS PROF
DFHSM.BACK.T104205.M734413.F240BV09.H7001    YES  003  006  NO   NO
DFHSM.BACK.T244205.M734413.F240BV09.H7001    YES  002  006  NO   NO
DFHSM.BACK.T564105.M734413.F240BV09.H7001    YES  004  006  NO   NO
DFHSM.BACK.T494205.M734413.F240BV09.H7003    YES  001  004  NO   NO
      END OF DISPLAY - 00000012 BACKUP VERSIONS ELIGIBLE FOR EXPIRATION