I have a multi file dataset defined in the CA DYNAM catalog. My operator deleted a version that I need to do an IDCAMS restore. I added this version back to the CA DYNAM catalog, but I'm failing in the IDCAMS restore

Document ID : KB000054495
Last Modified Date : 14/02/2018
Show Technical Document Details

Description

A multi file dataset definition exists in the CA DYNAM catalog. Unfortunately, a version of this dataset was deleted and I need to do an IDCAMS restore using that version. The version was added back to the catalog, but the IDCAMS RESTORE job fails. I'm getting message 4113D NO HDR1 LABEL FOUND INPUT SYS004=nnn

Solution

IDCAMS, LIBR and some other utilities do not use standard format file. In other words, there are imbedded TM in the middle of logical files. If the version has not been deleted, CA DYNAM /T Tape Management for z/VSE knows where the file start via the Cartridge block id that is saved in the CA DYNAM catalog. But if customer deletes the version, this cartridge block id is lost and there is no way to retrieve this information, nor to add the information back in the CA DYNAM catalog.

Sample BACKUP job and format of the tape:

  // TLBL BKFILE,'IDCAMS.BKUP.FILE1',,,,,,8 
  // EXEC TDYNASN 
  ASSGN SYS005,DUMMY 
  /* 
  // EXEC IDCAMS,SIZE=AUTO 
  BACKUP ( - 
    TEST.FAVER2           - 
    TEST.FAVER2O - 
    ) - 
  STDLABEL(BKFILE) 
  /* 

The format of the tape will be :

VOL1
HDR1
HDR2
TM

DBH records contains information about files backed up

TM
OHD records for the first file
TM
OHD records for the second file
TM
EOT record
TM
EOF1
EOF2

So you can see that the second logical file will be the 7th physical file instead of the 4th. And the number of physical files depend on the BACKUP command executed.

Please note also that if you need to copy this tapes onto new devices, you will have to first IDCAMS RESTORE the data to disk and do a BACKUP of the restored file to the new tape. There is no way to use any kind of copy utility to copy IDCAMS BACKUP multi file tapes under the control of CA DYNAM/T Tape Management for z/VSE.