This recovery scenario applies only to an overwritten header label. If the damage to the tape is more extensive than an overwritten label, the following recovery procedure will not work. Also, if the tape has been encrypted, there is similarly no way to recover it. If the tape cannot be recovered due to hardware problems related to the drive itself, consider sending it to your tape drive manufacturer for recovery.
If you have a duplex or a tape copy, perform a tape replace. You can reference this procedure in the TAPEREPL command: Replacing cartridge-type tape volumes with their alternate volumes.
In either case, route the recovery assistance through IBM® Support Center. Open a software problem report to diagnose the root cause of the damage, if it is not known.
When you open a problem record, you should be aware of the following information:
The main reason for this type of damage is that the wrong tape volume gets mounted to satisfy a mount request for a scratch tape. The problem typically remains undiscovered unless you need the overwritten tape volume to recover a data set.
Use the following recovery procedure to restore access to DFSMShsm data on single-file-format backup tapes that were partially overwritten by user data.
(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.BACKTAPE.DATASET
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 5 of this procedure.
IEBGENER can be used to perform the reinitialization task.
//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.BACKTAPE.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, issue 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.
BDELETE dsn VERSIONS(n)
HSEND FIXCDS C DFHSM.BACK.T500718.TONY3.AHRENS.I3006
gives
you the following results: MCH= 01602400 A6F7B92B F4BBC221 A6DAB593 9C8BBA03
* 7 4 B *
+000 E3D6D5E8 F34BC1C8 D9C5D5E2 4BC2C3C4 E2404040 40404040 40404040 40404040
*TONY3.AHRENS.DATA *
+020 40404040 40404040 40404040 E7E8E9F9 F0F50003 78048081 18075106 0093006F
* XYZ905 *
+040 00081000 0000001C 000004DD 0121C0E2 0000243C 00003060 0000E3D6
D5E8F0F5
.
.
HSEND PATCH .MCVT.+267 X'0A' VERIFY(.MCVT.+267 X'00')
HSEND PATCH .MCVT.+267 X'00' VERIFY(.MCVT.+267 X'0A')
LIST dsn
The output gives you the original data set name: TONY3.AHRENS.BCDS and the version number: +040 00081000 000000 1C 000004DD
BDELETE DSN(TONY3.AHRENS.DATA) VERSION(28)
RECYCLE VOLUME(volser) EXECUTE
99//BDSCMDS JOB
//*******************************************************************
//*PLEASE CHANGE ALL THE FOLLOWING TO THE APPROPRIATE VALUES:
//*?USERID -TO YOUR USER ID
//*?DFSMSHSM -TO THE DFSMSHSM PREFIX FOR YOUR BCDS
//*?VLSER -TO THE VOLSER OF YOUR DAMAGED BACKUP VOLUME
//*******************************************************************
//*THIS STEP USES SORT UTILITY TO FIND ALL
//*ASSOCIATED MCB AND MCC RECORDS,IDENTIFYING THE MOST RECENT
//*BACKUP VERSION THAT WAS OVERWRITTEN ON THE DAMAGED BACKUP
//*VOLUME.IT ALSO GENERATES THE BACKDS COMMANDS TO CREATE A
//*NEW BACKUP VERSION.
//*****************************************************************
//STEP1 EXEC PGM=SORT,REGION=4096K
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=?DFSMSHSM.BCDS,AMP='BUFND=50'
//SORTOUT DD DISP=(NEW,CATLG),DSN=?USERID.BCDSSRT1,
// UNIT=SYSDA,SPACE=(CYL,(5,1),RLSE),
// DCB=(LRECL=2048,BLKSIZE=0,RECFM=VB,DSORG=PS)
//SYSIN DD *
SORT FIELDS=(COPY)
INCLUDE COND=(1,4,BI,GE,X'00C1')
/*
//STEP2 EXEC PGM=SORT,REGION=4096K
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=?USERID.BCDSSRT1
//SORTOUT DD DISP=(NEW,CATLG),DSN=?USERID.BCDSSRT2,
// UNIT=SYSDA,SPACE=(CYL,(5,1),RLSE),
// DCB=(LRECL=2048,BLKSIZE=0,RECFM=VB,DSORG=PS)
//SYSIN DD *
SORT FIELDS=(COPY)
INCLUDE COND=(51,1,BI,EQ,X'20')
OUTREC FIELDS=(1,4,5,44,X,149,44,X'0001')
/*
//STEP3 EXEC PGM=SORT,REGION=4096K
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=?USERID.BCDSSRT1
//SORTOUT DD DISP=(MOD,CATLG),DSN=?USERID.BCDSSRT2
//SYSIN DD *
SORT FIELDS=(COPY)
INCLUDE COND=(51,1,BI,EQ,X'24',AND,113,6,CH,EQ,C'?VLSER')
OUTREC FIELDS=(1,4,69,44,X,5,44,X'0001')
/*
//STEP4 EXEC PGM=SORT,REGION=4096K
//SYSOUT DD SYSOUT=*
//SORTIN DD DISP=SHR,DSN=?USERID.BCDSSRT2
//SORTOUT DD DISP=(NEW,CATLG),DSN=?USERID.MERGED.BCDS.RECORDS,
// UNIT=SYSDA,SPACE=(CYL,(5,1),RLSE),
// DCB=(LRECL=255,BLKSIZE=0,RECFM=VB,DSORG=PS)
//SYSIN DD *
SORT FIELDS=(50,44,CH,A)
SUM FIELDS=(94,2,BI)
/*
//STEP5 EXEC PGM=SORT,REGION=4096K
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=?USERID.MERGED.BCDS.RECORDS,DISP=SHR
//BKDSREC DD DSN=?USERID.BKDS.RECORDS,DISP=(NEW,CATLG),
// DCB=(LRECL=255,BLKSIZE=0,RECFM=FB,DSORG=PS),
// SPACE=(TRK,(5,1),RLSE),UNIT=SYSDA
//*BUILD HSEND BACKDS COMMANDS.
//******************************************************************
//*THE INCLUDE STATEMENT SELECTS MCB RECORDS THAT CONTAIN
//*THE VOLSER OF YOUR DAMAGED ML1 VOLUME.
//*THE OUTREC STATEMENT BUILDS AN HSEND BACKDS COMMAND
//*FOR EACH DATA SET FOUND.
//******************************************************************
//SYSIN DD *
SORT FIELDS=(COPY)
OUTFIL FNAMES=BKDSREC,
INCLUDE=(94,2,BI,EQ,X'0002'),CONVERT,
OUTREC=(C'HSEND BACKDS ',5,44,255:X)
/*