ADD command examples
Here are some of examples of using the ADD command with IMS Database Recovery Facility.
Delete and redefine example: two production databases prior to recovery
The following example will delete and redefine two production databases prior to recovery:DBDSL004(DISP(NEW))
ADD DB(DBOVLFPC DIVNTZ02) DBATRB(DBDSL(004))
START
Delete and redefine example: two fast path areas to a different volume
The following example will delete and redefine two fast path areas to a different volume:DBDSL004(DISP(NEW),VOL(SCR003))
OUTPUT(PRO)
ADD AREA(DEDBJN22 DB22AR0 DEDBJN22 DB22AR2) DBATRB(DBDSL(004))
START
Single data set example: recover to copy
The following is an example of naming and locations of a single data set.
Original
data set name: PROD.MYDATA.INV.NEW
Duplicate
output data set that you want: HIQUAL.MYDATA.INV.NEW
The SYSIN DD specification you need:
SYSIN DD *
OUTPUT(DUP)
DBDSN002('HIQUAL')
...
DBDSL002(DISP(NEW),DATAC(myclass),VOL(myvol1))
...
ADD DBDS(MYDATA INV) DBATRB(DBDSL(002),DBDSN(002))
The output report will look like this:
Database Recovery Facility Duplicate Data Set Report
DB DD Dsname
MYDATA INV HIQUAL.MYDATA.INV.NEW
Multiple data set example: recover to copy
The following is an example of naming and locations of multiple data sets.
Original
data sets names: PROD.MYDATA.INV.NEW
PROD.MYDATA.SHIPMENT.NEW
Duplicate
output data set that you want with both data sets having the same
attributes: HIQUAL.MYDATA.INV.NEW
HIQUAL.Mydata.Shipment.new
SYSIN DD specification:
SYSIN DD *
OUTPUT(DUP)
DBDSN003('HIQUAL')
...
DBDSL004(DISP(NEW),DATAC(myclass),VOL(myvol1))
...
ADD DBDS(MYDATA INV MYDATA SHIPMENT MYDATA ORDERS)
DBATRB(DBDSL(004),DBDSN(003))
Change accumulation group example: recover to copy
The following is an example of naming and locations of multiple data sets within a change accumulation group.
Original data set names
in change accumulation group mycagrp
:
PROD.MYDATA.INV.NEW
PROD.MYDATA.SHIPMENT.NEW
PROD.MYDATA.ORDERS.NEW
PROD.MYDATA.ACCTRECV.NEW
Copy output data sets that you want:
HIQUAL.MYDATA.INV.NEW
HIQUAL.MYDATA.SHIPMENT.NEW
HIQUAL.MYDATA.ORDERS.NEW
HIQUAL.MYDATA.ACCTRECV.NEW
You want the data set HIQUAL.MYDATA.INV.NEW
to
reside on myvol1
, the data set HIQUAL.MYDATA.SHIPMENT.NEW
to
reside on myvol2
, and for HIQUAL.MYDATA.ORDERS.NEW
and HIQUAL.MYDATA.ACCTRECV.NEW
to
reside on the default volume, myvol3
.
The SYSIN DD specification you need is:
SYSIN DD *
OUTPUT(DUP)
DBDSN005('HIQUAL')
...
DBDSL006(DISP(NEW), DATAC(myclass) VOL(myvol3) -
DBN(MYDATA) DDN(INV) DATAC(myclass),VOL(myvol1), -
DBN(MYDATA) DDN(SHIPMENT) DATAC(myclass),VOL(myvol2))
...
ADD CAGRP(MYCAGRP) DBATRB(DBDSL(006),DBDSN(005))
The output report will look like this:
Database Recovery Facility Duplicate Data Set Report
DB DD Dsname
MYDATA INV HIQUAL.MYDATA.INV.NEW
MYDATA SHIPMENT HIQUAL.MYDATA.SHIPMENT.NEW
MYDATA ORDERS HIQUAL.MYDATA.ORDERS.NEW
MYDATA ACCTRECV HIQUAL.MYDATA.ACCTRECV.NEW
All data
sets are created using the SMS data class myclass
and
they reside on different volumes.