EXPIRE and SCRATCH Tape via BATCH job on VOLSER
search cancel

EXPIRE and SCRATCH Tape via BATCH job on VOLSER

book

Article ID: 142033

calendar_today

Updated On:

Products

CA 1 Flexible Storage CA 1 Tape Management - Copycat Utility CA 1 Tape Management - Add-On Options

Issue/Introduction

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.

 

Environment

Release : 14.0

Component : CA 1 Tape Management

Resolution

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=ZEROS           
//                        


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:

//TMSUPDTE.SYSIN DD *     
VOL vvvvvv,NODSN          
REP EXPDT=ZEROS           
REP FLAG3=HEXZEROS
REP EDMID=HEXZEROS
REP OUTCODE=' VMS' 
REP SLOT=HEXZEROS  
REP OUTDATE=ZEROS  
//   
              
Using the above control statements the EDM bit X'20' in FLAG3 is turned off, 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.