Restore a backup tape

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

The following JCL will restore a backup tape.

//RESTORE    EXEC PGM=LIBUTIL,PARM='RESTORE'
//STEPLIB  DD  DSN=CAI.RO60LIB,DISP=SHR
//ROSLIB00 DD  DSN=CAI.ROSLIB00,DISP=SHR
//ROSLIB01 DD  DSN=CAI.ROSLIB01,DISP=SHR
//ROSLIB02 DD  DSN=CAI.ROSLIB02,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//BACKUP   DD  DSN=CAI.BACKUP,DISP=SHR
/*

Restore selected members from a backup tape

The following JCL will restore selective members from the backup file to the ROSLIBS

//ROSLIB   EXEC PGM=LIBUTIL,PARM='SELREST'
//STEPLIB  DD  DSN=CAI.RO60LIB,DISP=SHR
//ROSLIB00 DD  DSN=CAI.ROSLIB00,DISP=SHR
//ROSLIB01 DD  DSN=CAI.ROSLIB01,DISP=SHR
//ROSLIB02 DD  DSN=CAI.ROSLIB02,DISP=SHR
//BACKUP   DD  DSN=CAI.BACKUP,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSIN DD *
pfx1.member1
pfx2.member2
/*

Restore a backup file to a user key

The following JCL will restore one or more keys from the backup file to the ROSLIBS.

//ROSLIB   EXEC PGM=LIBUTIL,PARM='RESTKEY'
//STEPLIB  DD  DSN=CAI.RO60LIB,DISP=SHR
//ROSLIB00 DD  DSN=CAI.ROSLIB00,DISP=SHR
//ROSLIB01 DD  DSN=CAI.ROSLIB01,DISP=SHR
//ROSLIB02 DD  DSN=CAI.ROSLIB02,DISP=SHR
//BACKUP   DD  DSN=CAI.BACKUP,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSIN DD *
INKEY=*,OUTKEY=ROSCO99
/* 

The sample above shows restoring the entire backup tape to the key ROSCO99.

To restore only a single key, select the key with INKEY=

i.e. INKEY=KEY01,OUTKEY=KEY13

If there is a member with the same name already on the Advantage CA-Roscoe library, LIBUTIL will replace it. If you do not want the member replaced, include "NOREPLACE" in the parameter list.

Restore a user key

The following JCL will restore an entire key from the backup file to the ROSLIBS

//ROSLIB   EXEC PGM=LIBUTIL,PARM='SELKEY'
//STEPLIB  DD  DSN=CAI.RO60LIB,DISP=SHR
//ROSLIB00 DD  DSN=CAI.ROSLIB00,DISP=SHR
//ROSLIB01 DD  DSN=CAI.ROSLIB01,DISP=SHR
//ROSLIB02 DD  DSN=CAI.ROSLIB02,DISP=SHR
//BACKUP   DD  DSN=CAI.BACKUP,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//SYSIN DD *
KEY=MYKEY99
/* 

Restore selected prefix

The following JCL will restore selected prefixes from the backup file to the ROSLIBS

//  EXEC PGM=LIBUTIL,PARM=SELPFX
//STEPLIB  DD  DISP=SHR,DSN=CAI.RO60LIB
//BACKUP   DD  DISP=SHR,DSN=CAI.BACKUP
//ROSLIB00 DD  DISP=SHR,DSN=CAI.ROSLIB00
//ROSLIB01 DD  DISP=SHR,DSN=CAI.ROSLIB01
//ROSLIB02 DD  DISP=SHR,DSN=CAI.ROSLIB02
//SYSPRINT DD SYSOUT=*
//SYSIN    DD *
IN=PF1,OUT=PFA
IN=PF2,OUT=PF2
/*

If there is a member with the same name already on the Advantage CA-Roscoe library, LIBUTIL will replace it. If you do not want the member replaced, include "NOREPLACE" in the parameter list.