If you have a duplex or a tape copy, perform a tape replace. This procedure is described in TAPEREPL command: Replacing cartridge-type tape volumes with their alternate volumes.
In either case, you should route the recovery assistance through IBM®. You may open a software problem report to diagnose the root cause of the damage, if it is not known.
Ensure that you have a backup copy of any data set that is going to tape (migration level 2). If a backup copy is available, you can recover from a backup version without having to recover from the damaged tape.
The following information is relevant to know or have available when you open a problem record:
In some cases, you cannot recover some or any of the data (depending on the extent of the damage). A backup of the tape ensures that this is not a concern. Back up the data, if the data matters, before going to migration level 2 (ML2).
The main reason for this type of damage is that the wrong tape volume is mounted to satisfy a mount request for a scratch tape. The problem typically remains undiscovered unless you need the overwritten tape volume to recall a data set.
Use the following recovery procedure to restore access to DFSMShsm data on tape cartridges. This procedure will not work for reel-type tape because of a difference in file format.
(This step is optional.) If the user data that was written over the DFSMShsm data is wanted, you will need to create a copy of that data. The damaged tape volume will be returned to scratch or to DFSMShsm for its later use, and the user data that was written on this volume will be lost at the end of this procedure.
prefix.HMIGTAPE.DATASET
The prefix can be any valid qualifier. For example, you can use the migration prefix as specified on the SETSYS MIGRATEPREFIX command, or the UID. This step will create a good tape label on the damaged tape. Once the tape label is valid, the volume can be processed by RECYCLE in step 4 of this procedure.
IEBGENER can be used to perform the reinitialization task.
Included in the example that follows are the various messages that are generated from this job and the appropriate replies.
//GENR JOB
//STEP1 EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY,LRECL=16384,BLKSIZE=16384,RECFM=F
//SYSUT2 DD DISP=(NEW,KEEP),DCB=*.SYSUT1,UNIT=?3480,
// DSN=prefix.HMIGTAPE.DATASET,VOL=SER=?ml2volser
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
/*
J E S 2 J O B L O G
JOB09371 $HASP373 HAMMERTA STARTED - INIT 3 - CLASS A - SYS ..
JOB09371 *IEF233A M 5A8,HAMMRT,,HAMMERTA,STEP1
JOB09371 IEC512I LBL ERR 5A8,SMFDMP,SL,HAMMRT,SL,HAMMERTA,STEP1
JOB09371 *IEC507D E 5A8,SMFDMP,HAMMERTA,STEP1,DMP.T241T240.DATA
JOB09371 IEC507D REPLY 'U'-USE OR 'M'-UNLOAD
JOB09371 R 78,U
JOB09371 *IEC534D A 5A8,SMFDMP,SL,HAMMERTA,STEP1
JOB09371 IEC534D REPLY 'U'-USE OR 'M'-UNLOAD
JOB09371 R 84,U
JOB09371 *IEC704A L 5A8,HAMMRT,SL,NOCOMP,HAMMERTA,STEP1
JOB09371 IEC704A REPLY 'VOLSER,OWNER INFORMATION','M'OR'U'
JOB09371 R 87,'HAMMRT,DFSMSHSM'
JOB09371 IEC705I TAPE ON 5A8,HAMMRT,SL,NOCOMP,HAMMERTA,STEP1
JOB09371 IEF234E K 5A8,HAMMRT,PVT,HAMMERTA,STEP1
JOB09371 HAMMERTA STEP1 : 00:17:30/ 00:00:00/ 53 - R000
JOB09371 $HASP395 HAMMERTA ENDED
Issue the LIST TTOC(volser) ODS(dsname) command to determine if your damaged tape volume is associated with a previous tape volume. If your damaged tape is associated with a previous tape, it will be listed under the heading “PREV VOL.” When there is a previous tape, it means that the first data set on your damaged tape began on the previous tape.
To verify whether your damaged tape is associated with a previous tape, enter the LIST TTOC(prev_volser) command and check to see that the last data set name on the previous tape is the same as the first data set name on your damaged tape. Note that if your installation is using extended tape table of contents, the LIST TTOC command might require an extended period of time to process each tape volume.
DELETE dsn
RECOVER dsn
HSEND PATCH .MCVT.+267 X'0A' VERIFY(.MCVT.+267 X'00')
HSEND PATCH .MCVT.+267 X'00' VERIFY(.MCVT.+267 X'0A')
RECYCLE VOLUME(volser) EXECUTE
LIST TTOC(volser) ODS(dsn)
Build RECOVER commands for each data set on the list, but do not process the commands until step 7.
//RCVCMDS JOB
//*******************************************************************
//* Please change all the following to the appropriate values:
//* ?USERID - to your user id
//* ?DFSMShsm - to the DFSMShsm prefix for your MCDS
//* ?VLSER - to the volser of your damaged tape volume
//*******************************************************************
//* This step uses SORT utility to build RECOVER
//* commands.
//*******************************************************************
//STEP1 EXEC PGM=SORT,REGION=4096K
//*******************************************************************
//* The INCLUDE statement selects MCD records (X'00'
//* at offset 51), that have the volser of your damaged tape and
//* have the MCDFASN bit on.
//* The OUTREC statement builds a RECOVER command for each
//* migrated data set found.
//*******************************************************************
//SYSOUT DD SYSOUT=*
//MCDS DD DSN=?DFSMSHSM.MCDS,DISP=SHR
//CMDS DD DSN=?USERID.TEST.SORTMCD,DISP=(NEW,CATLG),
// DCB=(LRECL=255,BLKSIZE=0,RECFM=VB),
// SPACE=(CYL,(5,1),RLSE),UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=(COPY)
INCLUDE COND=((51,1,BI,EQ,X'00'),AND,
(69,6,CH,EQ,C'?VLSER'),AND,
(75,1,BI,EQ,B'1.......'))
OUTREC FIELDS=(1,4,C' HSEND RECOVER ',5,44)
/*
The FORCE parameter of the RECYCLE command causes all data sets with errors to be deleted from the control data sets and the catalog. The deletion makes the tape empty, and the tape is removed from DFSMShsm's inventory of tapes that contain data.
If the RECYCLE command fails with return code 16, you must issue a second RECYCLE VOLUME command to recycle the valid data sets while processing in single buffer mode. For an explanation of return code 16, use LookAt or see z/OS MVS System Messages, Vol 2 (ARC-ASA) and the table in the appendix titled "Reason Codes for Message ARC0734I when the Action is RECYCLE and Return Code is 16."