The procedure for installing Data Restore under VSE has three steps. You must do these steps in order.
Before using this chapter to install Data Restore in a VSE environment, refer to the installation manual for your VSE system for an overview of how to install optional programs.
When you use VSE/Interactive Interface (VSE/II), the job stream generated installs Data Restore in the VSE library PRD2.RCVvrm Although you can override this library, do not. All of the jobs described in this manual assume that the target library is PRD2.RCVvrm. If you decide to install Data Restore in a different library, you must change any LIBDEF statements that refer to PRD2.RCVvrm.
IBM distributes the machine-readable product on magnetic tape (reel or cartridge, non-stack). The format of the tape for VSE is:
This tape is meant to be processed by the VSE maintain system history program (MSHP) or VSE/II. You need the following information to restore the Data Restore library:
Ensure that you have a distribution tape in the correct format for your VSE system. To verify this tape, scan it by running the example JCL shown in Figure 18.
Figure 19 shows a report from the scan job.
The scan report also shows the space requirements for different DASD types. You need this information if you have to define the library as described in Step 1. Define the Library to be Installed.
Figure 18. Scanning the Data Restore Feature Version 7.1.0 Distribution Library
//JOB SCAN TAPE
* *********************************************************************
* PLEASE MOUNT DB2.RCV.7.1.0 DISTRIBUTION TAPE ON A TAPE DRIVE
* AND ASSIGN SYS006 TO THAT TAPE DRIVE.
* THEN PRESS THE ENTER KEY WHEN READY ...
* **********************************************************************
// PAUSE PLEASE ASSIGN SYS006 NOW ...
// MTC REW,SYS006
// EXEC LIBR
RESTORE * TAPE=SYS006 SCAN=YES
/*
/&
Figure 19. Report from the Scan Job
RESTORE * TAPE=SYS006 SCAN=YES
L0591 BACKUP FILE ID = 'DB2VSE.RCV.7.1.0'
L123I HISTORY FILE FOUND ON TAPE
L091I SUBLIBRARY XSOFT.RCV710 FOUND ON INPUT TAPE
APPROXIMATE SPACE REQUIREMENT : 1093 LIBRARY BLOCKS
3375 : 59 TRACKS = 4 CYLINDERS 11 TRACKS
3380 : 48 TRACKS = 3 CYLINDERS 3 TRACKS
3390 : 45 TRACKS = 3 CYLINDERS 0 TRACKS
9345 : 53 TRACKS = 3 CYLINDERS 8 TRACKS
FBA : 2932 BLOCKS
L113I RETURN CODE OF RESTORE IS 0
To help you install Data Restore on a VSE system, sample job control members are included on the Data Restore distribution tape. They are distributed as Z-type source members in the Data Restore sublibrary. Load these members as part of preparing for installation, as described in Step 2. Restore the Data Restore Distribution Library.
Depending on how you choose to install Data Restore, you may have to change some of the job control members before submitting them for execution. These members and the changes needed are discussed in the following installation steps. You can punch these members out of the Data Restore sublibrary into VSE/ICCF or card decks for editing and re-submission, or, because most of them are short, you can type them in yourself.
This step is optional.
If the PRD2 library already exists and there is enough space in the library to contain the Data Restore feature, skip the rest of this step and go to Step 2. Restore the Data Restore Distribution Library.
If you want to install Data Restore in a library created in a VSE/VSAM space, you must:
If you want to install Data Restore in a library created in a non-VSE/VSAM space, you must:
Note: | The IBM-supplied installation procedures and examples assume that Data Restore is installed in library PRD2, sublibrary RCVvrm If you install it elsewhere, make sure you change the job control statements as needed in all subsequent procedures and examples. |
Refer to your VSAM manual for library cluster definitions. Figure 20 shows a job that can be used to define a VSE/VSAM library cluster.
Figure 20. Defining a VSE/VSAM Library Cluster
// JOB DEFINE VSE LIBRARY
// EXEC IDCAMS,SIZE=AUTO
DEFINE CLUSTER -
(1) ---> (NAME(VSE.PRD2.LIBRARY) -
(2) ---> VOLUMES(volidn) -
NONINDEXED -
RECORDFORMAT(NOCIFORMAT) -
SHR(3) -
(3) ---> CYL(primary secondary) -
(4) ---> DATA(NAME(VSE.PRD2.LIBRARY.DATA))) -
(4) ---> CATALOG(VSAM.MASTER.CATALOG)
/*
/&
To define the file names of the library that will contain the Data Restore feature, prepare DLBL and EXTENT statements for the library, based on the type (VSE/VSAM or non-VSE/VSAM). One of the job streams shown in Figure 21 stores the applicable statements into the system standard subarea of the label information area. You should also add the applicable statements to the existing standard label loading procedure used in the automated system initialization (ASI) process.
Figure 21. Adding the Data Restore Library Information in the Standard Subarea
// JOB ADDSTDL FOR VSE LIBRARY IN VSE/VSAM SPACE
// OPTIONS STDLABEL=ADD
(1) ---> // DLBL PRD2,'VSE.PRD2.LIBRARY',,VSAM,CAT=IJSYSCT,DISP=(OLD,KEEP)
/&
or
// JOB ADDSTDL FOR VSE LIBRARY IN NON-VSE/VSAM SPACE
// OPTION STDLABEL=ADD
(1) ---> // DLBL PRD2,'VSE.PRD2.LIBRARY'
(2) ---> // EXTENT volidn,1,0,xxx,yyy
/*
/&
Use the job shown in Figure 22 to define a new VSE library and sublibrary (either BAM or VSAM). For more information about library definitions, refer to the system control statements manual for your VSE system.
Figure 22. Defining a New Library and Sublibrary for Data Restore
// JOB DEFINE LIBRARY & SUBLIBRARY
// EXEC LIBR
ON $RC>4 GOTO ENDJOB
(1) ---> DEFINE LIB=PRD2
DEFINE SUBLIB=PRD2.RCVvrm R=Y
/. ENDJOB
/*
/&
This step is mandatory.
You can restore the Data Restore distribution library in one of two ways:
Figure 23. Job INSvrRCV (Using MSHP to Install Data Restore in VSE)
// JOB INSvrRCV INSTALL DB2 RECOVERY FEATURE
// MTC REW,cuu *-- REWIND TAPE
// ASSGN SYS002,cuu1 *--AUXILIARY HISTORY FILE
// ASSGN SYS005,UA *--NO RESTORE TO DOSRES
// ASSGN SYS006,cuu *--DISTRIBUTION TAPE
// OPTION CATAL
// EXEC MSHP
(1) ---> INSTALL PRODUCT FROM TAPE ID='DB2VSE.RCV.7.1.0'- *--ACTUAL TAPE ID
(2) ---> PROD IN=PRD2.RCVvrm *--IDENTIFICATION OF LIBRARIES
DEFINE HISTORY AUX EXTENT=xxx:yyy
/*
// MTC RUN,cuu
/&
Before execution, modify the above statements as follows:
Notes:
To install Data Restore, do the following mandatory steps. You must do them in order.
Note: | Mandatory steps are marked with an asterisk (*). Optional steps are marked with a circle (Resource Adapter Change transaction (CIRC)). |
Note: | If a procedure within any of the steps does not execute successfully, correct the problem and rerun the entire step before continuing. |
Technique used for installation:
All of the job control members used in the install process are in the Data Restore sublibrary cataloged as Z-type members. You can use the job shown in Figure 24 as an example of the JCL required to punch out the job control members.
Figure 24. Example of JCL Required to Punch Out Z-TYPE Members
// JOB PUNCH Z TYPE
* ***************************************************
* PURPOSE : JOB STREAM TO PUNCH OUT MEMBER XXXXXXXX.Z
* ***************************************************
// EXEC LIBR,PARM='MSHP'
ACCESS SUBLIB=PRD2.RCVvrm
PUNCH XXXXXXXX.Z
/*
/&
You may have to modify several job control statements before execution as specified in the following steps.
This step is mandatory.
You need three public dbspaces:
Note: | This dbspace is not acquired during installation. |
To acquire the dbspaces needed by Data Restore, run the job control member XTS9ACQ as shown in Figure 25. This job should end with a DB2 Server for VSE & VM return code of 0. Ensure that the job is run successfully before continuing.
Figure 25. Job XTS9ACQ (Acquiring Dbspaces)
(1) ---> ..* $$ JOB JNM=XTS9ACQ,CLASS=0
// JOB XTS9ACQ
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* XTS9ACQ : Data Restore FEATURE
* : ACQUIRING DBSPACES
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(2) ---> // LIBDEF *,SEARCH=PRD2.DB2vrm
(3) ---> // EXEC ARIDBS,SIZE=AUTO,PARM='DBNAME(dbname)'
(4) ---> CONNECT SQLDBA IDENTIFIED BY XXXXXXXX;
(5) ---> ACQUIRE PUBLIC DBSPACE NAMED DATARFTR(PAGES=6400,PCTFREE=0,STORPOOL=xx);
(5) ---> ACQUIRE PUBLIC DBSPACE NAMED DATARFT2(PAGES=1024,PCTFREE=0,STORPOOL=xx,
PCTINDEX=10);
/*
/&
..* $$ EOJ
Note: | With the STORPOOL parameter, you may select either a recoverable or a nonrecoverable storage pool. Define the dbspaces in a nonrecoverable storage pool, if possible. |
This step is mandatory.
To create the Data Restore tables, run the job control member XTS9CRE shown
in Table 4. Punch the member; if the user retypes it,
errors may occur. The job should end with an SQLCODE of 0.
Ensure the job is run successfully. If not, review the report created,
correct the cause of the error, and rerun the job.
Table 4. Job XTS9CRE (Create Environment)
(1) ---> ..* $$ JOB JNM=XTS9CRE,CLASS=0 |
// JOB XTS9CRE |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* XTS9CRE : Data Restore FEATURE |
* : CREATE DATA BASE MANAGER ENVIRONMENT |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
* XTS9CRE : Data Restore FEATURE |
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
(2) ---> // LIBDEF *,SEARCH=PRD2.DB2vrm |
(3) ---> // EXEC ARIDBS,SIZE=AUTO,PARM='DBNAME(dbname)' |
(4) ---> CONNECT SQLDBA IDENTIFIED BY XXXXXXXX; |
CREATE TABLE IXLNGVAR (DBNO SMALLINT NOT NULL,PAGENO INTEGER NOT NULL |
,RECNO INTEGER NOT NULL) IN DATARFT2; |
... |
COMMIT WORK; |
/* |
/& |
..* $$ EOJ |
|
This step is mandatory.
To reload the Data Restore packages, run the job control member XTS9PREP shown in Figure 26. You must punch the job to run it. It cannot be retyped. Update the database name and password before you run the job.
The job should end with an SQLCODE of 0. Ensure the job is run successfully. If not, review the report created, correct the cause of the error, and rerun the job.
Note: | If the job is run more than once in a database, an error may occur on the revoke command. This error can be ignored. |
Figure 26. Job XTS9PREP (Reload Packages)
(1) ---> ..* $$ JOB JNM=XTS9PREP,CLASS=0
// JOB XTS9PREP
// LIBDEF *,SEARCH=PRD2.DB2vrm
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* XTS9PREP: Data Restore FEATURE
* : RELOAD PACKAGES
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(2) ---> // EXEC ARIDBS,SIZE=AUTO,PARM='DBNAME(dbname)'
(3) ---> CONNECT SQLDBA IDENTIFIED BY XXXXXXXX;
(4) ---> RELOAD PROGRAM(SQLDBA.LMBRP029) INFILE(SYSIPT) REPLACE;
...
/*
(6) ---> GRANT RUN ON LMBRP064 TO PUBLIC;
GRANT RUN ON XTS91002 TO PUBLIC;
SET ERRORMODE CONTINUE;
(7) ---> REVOKE CONNECT FROM DATARFTR;
COMMIT WORK;
/*
/&
..* $$ EOJ
This step is mandatory.
To link-edit XTSOPRDI, run the job control member XTS9PRDI shown in Figure 27. This job should end with a return code of 0.
Figure 27. Job XTS9PRDI (Link-edit XTSOPRDI)
(1) ---> ..* $$ JOB JNM=XTS9PRDI,CLASS=0
// JOB XTS9PRDI
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* XTS9PRDI: Data Restore FEATURE
* : LINK EDIT XTSOPRDI
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(2) ---> // LIBDEF PHASE,CATALOG=PRD2.RCVvrm / rcv sublibrary
(3) ---> // LIBDEF OBJ,SEARCH=PRD2.DB2vrm / sql/ds sublibrary
// OPTION CATAL
(4) ---> PHASE XTSOPRDI,*
(5) ---> INCLUDE ARIPRDID
/*
(6) ---> // EXEC LNKEDT,PARM='RMODE=24'
/*
/&
..* $$ EOJ
This step is mandatory.
To define the required VSAM files, run the job control member XTS9DEF shown in Figure 28.
The job ends with a return code of 8 on first execution because the DELETE CLUSTER command is processed for clusters that do not yet exist.
Figure 28. Job XTS9DEF (Define VSAM Files)
(1) ---> ..* $$ JOB JNM=XTS9DEF,CLASS=0
// JOB XTS9DEF
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* XTS9DEF : Data Restore FEATURE
* : DEFINE VSAM FILES
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(2) ---> // DLBL IJSYSUC,'vsesp.user.catalog',,VSAM
(3) ---> // EXEC IDCAMS,SIZE=AUTO
(4) ---> DELETE DIRWORK PURGE CLUSTER
(5) ---> DEFINE CLUSTER(NAME(DIRWORK) CYL(06)-
(6) ---> VOLUME(vvvvvv) CISZ(512) REUSE-
RECSZ(505 505) SHR(2) NIXD)
DELETE LMBRWRK PURGE CLUSTER
(7) ---> DEFINE CLUSTER(NAME(LMBRWRK) CYL(05)-
(6) ---> VOLUME(vvvvvv) CISZ(4096) REUSE-
RECSZ(4089 4089) SHR(2) NIXD)
DELETE LMBRLG1 PURGE CLUSTER
(8) ---> DEFINE CLUSTER(NAME(LMBRLG1) CYL(01)-
(6) ---> VOLUME(vvvvvv) REUSE-
RECSZ(4096 4096) SHR(2) NIXD)
DELETE LMBRLG2 PURGE CLUSTER
(9) ---> DEFINE CLUSTER(NAME(LMBRLG2) CYL(01)-
(6) ---> VOLUME(vvvvvv) REUSE-
RECSZ(4096 4096) SHR(2) NIXD)
DELETE LMBRLG3 PURGE CLUSTER
(10) ---> DEFINE CLUSTER(NAME(LMBRLG3) CYL(01)-
(6) ---> VOLUME(vvvvvv) REUSE-
RECSZ(4096 32750) SHR(2) NUMBERED)
/*
/&
..* $$ EOJ
Note: | You can specify a secondary allocation for all of the clusters. |
This step is optional.
While using Data Restore, you can pass parameters in SYSIPT by using the OPTIONS statement. Instead of passing these parameters, you can modify and assemble the LMBRPARM program to specify default values for them.
To customize your parameter defaults, punch the XTS9PARM.Z member and specify the appropriate values in the LMBRPARM macro as shown in Figure 29.
Notes:
Figure 29. Job XTS9PARM (Catalog Default Values)
(1) ---> ..* $$ JOB JNM=XTS9PARM,CLASS=0
// JOB XTS9PARM
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* XTS9PARM: Data Restore FEATURE
* : CATALOG DEFAULT VALUES
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
(2) ---> // LIBDEF PHASE,CATALOG=PRD2.RCVvrm
(2) ---> // LIBDEF *,SEARCH=PRD2.RCVvrm
// OPTION CATAL
(3) ---> PHASE LMBRPARM,*
// EXEC ASSEMBLY,SIZE=512K
(4) ---> MACRO
LMBRPARM &NOTA=E,&CASE=M,&DEVICE=TAPE, *
&COMMIT=0,&MSGCLAS=1,&MSGDEV=3, *
&DBAPW=SQLDBAPW,&BASE=SQL/DS V3R5,&LANG=S001,&CONFIRM=YES
LCLB &BIT1,&BIT2;
DC CL11'&PWD'
&BIT1 SETB ('&DEVICE' EQ 'TAPE')
&BIT2 SETB ('&DEVICE' EQ 'DASD')
DC AL1(&BIT1+&BIT2*2)
&BIT1 SETB ('&NOTA'(1,1) EQ 'E')
DC AL1(&BIT1)
&BIT1 SETB ('&CASE'(1,1) EQ 'M')
&BIT2 SETB ('&CASE'(1,1) EQ 'U')
DC AL1(&BIT1+&BIT2*2)
DC AL4(&COMMIT)
DC AL1(&MSGCLAS)
DC AL1(&MSGDEV)
DC CL8'&DBAPW'
DC CL8'&BASE'
DC CL4'&LANG'
DC CL1'&CONFIRM'
MEND
LMBRPARM CSECT
* in order to customize your default table
* modify the following statement specifying all required parameters
(5) ---> LMBRPARM LANG=S001
END LMBRPARM
/*
// EXEC LNKEDT,PARM='MSHP,RMODE=24'
/*
/&
..* $$ EOJ
Refer to OPTIONS and CONTROL Statements, for additional information on parameter values.
You can execute a job by specifying the library in which Data Restore is installed, unless it is defined in standard libraries. (You can create the jobs and store them in standard libraries for later use.)
You can define a job like the one in Figure 30 to execute the Data Restore functions in a VSE environment.
Figure 30. Example JCL to Execute Data Restore Functions
// JOB BACKUP
// LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm)
// EXEC PROC=ARIS71DB
// TLBL ARCHIV,'ARCHIVE.DB2'
// ASSGN SYS006,180
// MTC REW,SYS006
// EXEC XTS91001,SIZE=AUTO
.. function to process
/*
The SYSIN file specifies the command to process in the JCL after the EXEC XTS91001 statement.