Deleting specific versions of aggregates from a stacked tape

If you changed the value of the # Versions attribute in the Management Class Alter Panel to NOLIMIT to prevent roll-off of older versions of aggregates from a stacked tape, you must use the EXPIREBV ABARSVERSIONS command to expire and delete aggregate backup files. When one or more aggregate backups are removed during EXPIREBV ABARSVERSIONS processing, the output files (C, D, O, and I) associated with those aggregates are located in the catalog and a list of volume serial numbers that these files reside on is requested. When necessary, the volumes are deleted from the RACF HSMABR tape volume set. When you stack multiple aggregates on a tape unbeknownst to ABARS, you must use caution when expiring and deleting aggregate backup files using EXPIREBV ABARSVERSIONS command. If caution is not taken, tapes may be returned to scratch even if they still contain valid stacked aggregates.

The example below shows the format of the EXPIREBV command that you can use to expire aggregate backup versions, where aggregate_name is the name of the aggregate group and n is the number of versions of that aggregate group that you want to keep.
EXPIREBV EXECUTE ABARSVERSIONS(AGNAME(aggregate_name) RETAINVERSIONS(n)
Note: If you specify SETSYS EXITON(ARCTVEXT), DFSMShsm calls the installation exit ARCTVEXT for each volume that is being processed, indicating to the exit, that this is an ABARS tape volume. If you install DFSMSrmm, DFSMShsm calls the EDGTVEXT installation exit instead.
The example below shows how you can use the EXPIREBV command to delete the oldest version of the aggregate, if four versions of the aggregate AGM1 are stacked on four separate tapes. After the command executes, the oldest version is deleted and the tape that it is on is returned to the tape installation exit (even if there are other valid aggregate backups on the tape). The three remaining versions that were backed up after the oldest version was backed up, are kept:
    EXPIREBV EXECUTE ABARSVERSIONS(AGNAME(AGM1) RETAINVERSIONS(3)

As the tape installation exit (if active) will be called for any tape that contains the version being expired and deleted, you must either code your tape installation exit not to release ABARs tapes to scratch or do not run EXPIREBV ABARSVERSIONS unless you are expiring all the versions on a particular tape. If a tape is returned to scratch that still contains valid aggregates on it and the tape is reused by another job, future roll-off or EXPIREBV ABARSVERSIONS processing may again release the tape to scratch as ABARS still has record of the previously unexpired versions on the tape.