Is there a way to EXPIRE and SCRATCH a tape via a BATCH Job using specific VOLSER?
The same process as ISPF Utilities Options 5 and 11.
Release : 14.0
Component : CA 1 Tape Management
In order to EXPIRE a volume in batch run TMSUPDTE using the following control statements
to reset the EXPDT in the TMC volume record. This is actually the same as the ISPF EXPIRE function:
//TMSUPDTE.SYSIN DD *
VOL vvvvvv,NODSN
REP EXPDT=date in past or current date in format of yyyy/ddd
//
To SCRATCH the tape simply wait for the next daily TMSCLEAN PARM='SCRATCHLIST' run or run TMSCLEAN
with PARM='SCRATCHLIST' using the following control statements for a single volser only:
//TMSCLEAN.SYSIN DD *
VOL=vvvvvv
NOTE: tapes that are under EDM control or tapes that are vaulted (valid OUTCODE...) are not
scratched by TMSCLEAN even if the EXPDT is expired. In order to scratch these tapes clear the EDM
information and Vaulting information in the TMC volume record as well. This could
be done using the following TMSUPDTE control statements:
VOL vvvvvv,NODSN
REP VOLSEQ=1
REP EXPDT=date in past or current date in format of yyyy/ddd
REP FLAG2=01
REP EDMID=HEXZEROS
REP OUTCODE=' VMS'
REP SLOT=HEXZEROS
REP OUTDATE=ZEROS
//
Using the above control statements the expired by EDM bit X'01' in FLAG2 is turned on, the EDMID is cleared
and the vaulting fields OUTCODE, SLOT and OUTDATE are cleared. Note OUTCODE ' VMS' is a special
outcode which means, that the tape has returned from the vault and will not be vaulted again.
Sample TMSUPDTE and TMSCLEAN JCL is available in the CTAPJCL library.