How to build a VRECOVER that recovers all volumes from a previous VBACKUP with VOLUMES=ABC/ ?
search cancel

How to build a VRECOVER that recovers all volumes from a previous VBACKUP with VOLUMES=ABC/ ?

book

Article ID: 40117

calendar_today

Updated On:

Products

Disk Backup and Restore - MVS DISK BACKUP AND RESTORE- ADD-ON OPTIO DISK BACKUP AND RESTORE

Issue/Introduction

Question:

How to build a VRECOVER that recovers all volumes from a previous VBACKUP with VOLUMES=ABC/

For volume backups we can use wild carding to select volumes, for example: 

   SCAN REALVOLS,SHOWVOL 

   SELECT VOLUMES=ABC/ 

   VBACKUP RETPD=03 

 

But for volume recovers a corresponding wild card is not supported, like: 

   SCAN REALVOLS,SHOWVOL 

   VRECOVER VOLUMES=ABC/,RPT=MAP,GOAHEAD=CONTINUE 

 

Answer:

As a work around, you can use the following LISTD/SORT sample JCL. It gives you the wild carding you need.

The VBACKUP creates a special DSNINDEX record for each volume backed up. 

It contains the volser in the data set name field of the DSNINDEX record: DMSOS.Vxxxxxx 

So you can list all volume backups by a LISTD DSN=DMSOS.V/,FIELDS=(DSNAM,ARCDT,ATIME) 

Then you could select from this report for example all ABC/ volumes and generate 

the corresponding VRECOVER commands via SORT: 

 /*------------------------------------------------------------------- 

//LISTD EXEC LISTD 

//SYSPRINT DD DSN=ABC.LISTD.OUT, 

// DISP=(NEW,CATLG),UNIT=SYSDA, 

// SPACE=(CYL,(1,1),RLSE), 

// DCB=(RECFM=FB,LRECL=133,BLKSIZE=0) 

//SYSIN DD * 

LISTD DSN=DMSOS.V/, 

FIELDS=(DSNAM,ARCDT,ATIME) 

//*------------------------------------------------------------------- 

//SORT EXEC PGM=SORT,REGION=5M 

//SYSOUT DD SYSOUT=* 

//SORTIN DD DSN=ABC.LISTD.OUT,DISP=SHR 

//SORTOUT DD DSN=ABC.LISTD.CMDS, 

// DISP=(NEW,CATLG),UNIT=SYSDA, 

// SPACE=(CYL,(1,1),RLSE), 

// DCB=(RECFM=FB,LRECL=80,BLKSIZE=4000) 

//SORTIN DD * 

SORT FIELDS=COPY 

* SELECT VBACKUP DSINDEX RECORDS 

INCLUDE COND=(02,7,CH,EQ,C'DMSOS.V', 

* SELECT ALL ABC/ VOLUMES 

AND,09,3,CH,EQ,C'ABC') 

* GENERATE VRECOVER COMMAND 

OUTREC FIELDS=(C' VRECOVER VOLUMES=',9,6,C',GOAHEAD=CONTINUE',80:X) 

//*------------------------------------------------------------------- 

 

Additional Information:

There is also a corresponding idea "Support wild carding VOLUMES=ABC/ in VRECOVER" on our communities web page,

please see https://communities.ca.com/ideas/235726882 and comment and vote on it.

 

 

Environment

Release: SMDI3900200-12.5-Disk-Backup and Restore-for z/OS
Component: