DRDMVS - Restore Files from DrD Back-Up Tapes

                   

DRDMVS is an MVS utility program which processes back-up tapes created in VSE by the DrD (DoctorD or DCRABS) utility. Using DRDMVS, an OS/390 or z/OS installation can restore SAM, DAM or VSAM files from a DrD back-up tape, or list the files it contains. DoctorD is a product of B I Moyle.

DRDMVS was initially designed for VSE sites which convert to MVS and have a significant number of archive tapes in DrD format, which they may have to restore after the end of their migration, when they no longer have access to a VSE system. DRDMVS can also be used during the course of a VSE/MVS conversion to facilitate the transfer of VSE application data to MVS.

DRDMVS restores SAM, DAM and VSAM files into pre-allocated data sets. VSAM data sets must be empty, or have been DEFINEd with the REUSE option. VSAM files can be restored into non-VSAM data sets, as needed. Non-VSAM data sets must be allocated with the correct RECFM, LRECL and BLKSIZE attributes, or with RECFM=U,BLKSIZE=32760 in which case DRDMVS restores physical blocks and sets the BLKSIZE to the size of the largest block written. If the data set is allocated with RECFM=U,BLKSIZE=32760, DRDMVS checks all the data blocks for RECFM=VB records; if the file appears to be a valid RECFM=VB data set, the RECFM and LRECL attributes are set accordingly.

When VSAM clusters that were compressed with VSAMLITE in VSE are restored by DRDMVS, the data they contain is still in compressed format. If the VSAMLITE product is not available in the MVS environment, compressed data records can be decompressed using the VSAMLITE utility, an optional component of the DRDMVS package.

DRDMVS only supports DrD back-up tapes created with the following commands: SAVE=LOGICAL, SAVE=VSAM and SAVE=DATA. Processing of tapes created with other commands produces unpredictable results and is not supported.

DRDMVS support SAM, DAM, ESDS, KSDS and RRDS files. ISAM files, files which contain spanned records and VSAM-managed SAM files defined with RECFM(NOCIFMT) are not supported.

Running DRDMVS

DRDMVS runs as a batch job step in the MVS environment. Its processing is controlled by a PARM and SYSIN control statements.

PARM Field

The PARM field can contain three parameters separated by commas: PARM=(function,ddname,erropt)

  1. function is mandatory and must be specified as LIST or RESTORE
  2. ddname is mandatory and specifies the name of the JCL DD statement used to read the DrD input tape
  3. erropt is only used in conjunction with the RESTORE function. This parameter is optional and can be specified as STOP or CONTINUE. When STOP is specified, the RESTORE process stops when an error, such as a missing output data set, is encountered. Otherwise, the RESTORE process continues with the next data set specified in SYSIN.

DD Statements

DRDMVS uses the following DD statements:

  1. TAPEIN is used to read the DrD back-up tape, which may contain several files. An alternate DDname for TAPEIN can be specified as the second parameter in the PARM field.
  2. SYSPRINT is used to write messages.
  3. SYSIN is an input data set only used in conjunction with the RESTORE function. Each line of the SYSIN data set specifies the VSE file-id of a file which must be restored by DRDMVS. The VSE file-id must be enclosed in apostrophes (single quotes) if it contains blank spaces. If the file is restored under a different name, the MVS data set name must be specified on a continuation line, as shown in the example below. Comment lines start with an asterisk in position 1. Examples:
    	//SYSIN DD *
    	* Restore 12/99 payroll master
    	 PROD.PAYROLL.9912,
    	   MVSPROD.PAYROLL.DEC99
    	* Restore 12/99 payroll ledger
    	 'PROD PAYLEDGER 9912',
    	   MVSPROD.PAYROLL.LEDGER.DEC99 
  4. VSAMDEF is used to punch IDCAMS DEFINE CLUSTER commands.

Sample JCL (LIST)

List the files contained on a DrD back-up tape, write corresponding DEFINE commands to the VSAMDEF DD statement.

//LIST    EXEC PGM=DRDMVS,PARM=LIST
//STEPLIB  DD DSN=SYS2.DRDMVS.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//VSAMDEF  DD SYSOUT=*               VSAM DEFINE Commands
//*
//TAPEIN   DD VOL=SER=999999,UNIT=CART,DSN='CT99.SET.1' 

Sample JCL (RESTORE)

Restore/Rename two files from a DrD back-up tape, stop processing if any error is encountered.

//*
//*        Restore two files from a Dr D Backup tape
//*
//RESTORE EXEC PGM=DRDMVS,PARM=(RESTORE,DRDTAPE,STOP)
//STEPLIB  DD DSN=SYS2.DRDMVS.LOAD,DISP=SHR
//SYSPRINT DD SYSOUT=*
//*
//DRDTAPE  DD VOL=SER=999999,UNIT=CART,DSN='CT99.SET.1'
//*
//SYSIN    DD *
 CSCH.DP.COMPUTER.SCHD.SYSTEM.C,
   MVSPROD.BIGESDS
 'DEST.D/B.PROD',
   MVSPROD.BIGQSAM 

Messages

DRD01I PARM SPECIFIED FOR THIS RUN: 'parm'

DRD02I FILE NUMBER nnn WILL BE PRINTED.

DRD03I <Tape Allocation>

DRD04I <SYSIN Allocation>

DRD05E ** ERROR: INVALID CARD FORMAT

DRD06E ** DYNAMIC ALLOCATION ERROR, RC=rc, REASON=nnnn

DRD07E ** dsname COULD NOT BE OPENED, VSAM ERROR error

DRD08E ** NON-EMPTY DATA SET COULD NOT BE RESET, VSAM OPEN ERROR error

DRD11E RESTORE FAILED, RECORDS READ: nnn, RECORDS WRITTEN: nnn

DRD12I OPTION "STOP" SPECIFIED, TERMINATING EXECUTION.

DRD13I RESTORE SUCCESSFUL, RECORDS WRITTEN: nnn

DRD14I BLKSIZE SET TO nnnnn

DRD15I DCB ATTRIBUTES SET TO RECFM=VB,LRECL=nnnnn,BLKSIZE=nnnnn

DRD18I nnn FILES WILL BE RESTORED FROM DDNAME(tape_ddn).

DRD19E ** PREVIOUS ERRORS ENCOUNTERED, TERMINATING RUN WITH RC(rc)

DRD21I NOW RESTORING FILE NO nnn OUT OF nnn NAME(dsname) TYPE(E|K|R|N)

DRD22I DCB ATTRIBUTES USED TO RESTORE: RECFM(xxx) LRECL(nnnnn) BLKSIZE(nnnnn)

DRD28E BLOCK LENGTH nnnnn NOT A MULTIPLE OF LRECL

DRD29E BLOCK LENGTH nnnnn DIFFERENT FROM BDW nnnnn

DRD92W FILE(nnn) NAME(dsname) NOT FOUND ON TAPE.

DRD94E ERROR: RECORD NO nnnnnnn NOT A FILE HEADER; FIRST nnnn BYTES FOLLOW.

DRD95E ERROR: RECORD NO nnnnnnn NOT A TAPEMARK RECORD; FIRST nnnn BYTES FOLLOW.

DRD96E ERROR: RECORD NO nnnnnnn NOT A JDR.D EOF RECORD; FIRST nnnn BYTES FOLLOW.

DRD98I END OF PROCESSING; SUCCESSFUL RESTORES: nnn, FAILED RESTORES: nnn, STEP RETURN-CODE: rc

DRD99I EOJ Statistics 

VSAMLITE Utility

After restoring a VSAM KSDS which was compressed with the VSAMLITE product in VSE, the records it contains must be decompressed with the VSAMLITE utility which is installed in the DRDMVS load library.

VSAMLITE's JCL requirements are minimal, as it requires no PARM or control statements. VSAMLITE OPENs the compressed VSAM KSDS using the SYSUT1 DDname and writes messages to SYSPRINT.

Warning: Because VSAMLITE decompresses each record in-place, which may cause numerous CI and CA splits, it may be useful to REORG the KSDS after it has been decompressed by the VSAMLITE utility.

Sample JCL (VSAMLITE)

Decompress records in the MVSPROD.BIGKSDS data set.

//VSAMLITE EXEC PGM=VSAMLITE
//STEPLIB   DD DSN=SYS2.DRDMVS.LOAD,DISP=SHR
//SYSPRINT  DD SYSOUT=*
//*
//SYSUT1    DD DSN=MVSPROD.BIGKSDS,DISP=OLD