I think this JCL will allow you to restore a production backup file to a
test file that already exists. The REPLACE on the line labeled 26 below is
what writes over the existing. I copied this JCL from a job that had
CATALOG on line 26. I suggest caution in using this - I have always avoided
using the REPLACE parm to prevent wiping out existing data.
Good luck,
Joe
000012 //COPY EXEC PGM=ADRDSSU,REGION=2048K
000013 //SYSPRINT DD SYSOUT=*
000014 //SYSUDUMP DD SYSOUT=*
000015 //TAPE DD DISP=(OLD,KEEP),UNIT=TAPE,
000016 // DSN=THIS.IS.MY.PROD.BACKUP.G0001V00
000017 //SYSIN DD *,DCB=BLKSIZE=80
000018 RESTORE INDDNAME(TAPE) -
000019 DATASET(INCLUDE( -
000020 IDMS.PROD.FILE.NAME -
000021 )) -
000022 RENAMEU( -
000023 (IDMS.PROD.FILE.NAME, -
000024 IDMS.TEST.FILE.NAME) -
000025 ) -
000026 REPLACE -
000027 CANCELERROR -
000028 SHARE -
000029 WRC
000030 /*
Joseph E. Mundy II
Information Resources - Data Services
Southern Company Services
> * 770 840 3672 or internal 8 529 3672
* jem...@southernco.com
> -----Original Message-----
> From: ARCH...@aol.com [SMTP:ARCH...@aol.com]
> Sent: Sunday, March 05, 2000 3:00 PM
> To: IDM...@LISTSERV.IUASSN.COM
> Subject: [IDMS-L] Sample ADRDSSU JCL
>
> Hello Everyone:
>
> Does anyone have sample JCL for this IBM Utility that will let me restore
> from a production backup on tape with the production data set name, to an
> existing test data set that already exists on disk with a test data set
> name?
>
> I think that I have to do a restore and a rename in the same job step, but
> I
> cannot get it to restore over an existing data set name?
>
> I have been doing this, but, I cannot get this utility to restore over an
> existing data set with a different data set name, so I rename to a temp
> data
> set name then do an IEBGENER disk to disk copy, then delete the temp data
> set
> name.
>
> Pretty simple I would think? It is driving me crazy! I simply want to
> restore
> production data set name 'A' from the backup tape over top of test data
> set
> name 'A' and test data set name 'A' already exists.
Chris Hoelscher
IDMS Database Administrator
Humana Inc
500 West Main Street
NCT-20
Louisville KY 40202
502-580-2538
"Mundy, Joseph"
<JEMUNDY@SOUTHERNC To: IDM...@LISTSERV.IUASSN.COM
O.COM> cc:
Sent by: IDMS Subject: Re: Sample ADRDSSU JCL
Public Discussion
Forum
<IDMS-L@LISTSERV.I
UASSN.COM>
06/26/01 01:51 PM
Please respond to
IDMS Public
Discussion Forum
A fellow DBA has tested this and you are right -- you cannot RENAMEU and
REPLACE in the same execution. I much prefer the CATALOG parm that way I
know I'm not going to write over existing data.
Bill - this would leave you with a two step approach to use an IEFBR14 to
delete the file first and then use ADRDSSU to restore and rename.
Joe
__________________________________
Larry Parker
Harvard University Information Systems
1730 Cambridge St.
Cambridge, MA 02138
Email: larry_...@harvard.edu
Phone: (617) 495-3666
//******************************************************************
//* *
//* RESTORE FILE (UNDER A DIFFERENT NAME) *
//* *
//******************************************************************
//*
//RESTORE1 EXEC PGM=ADRDSSU,REGION=2048K
//*
//TAPE1 DD DSN=X111.X111.G9999V00,DISP=OLD <= BACKUP FILE
//*
//SYSPRINT DD SYSOUT=*
//*
//SYSIN DD * <= CONTROL CARDS
RESTORE -
INDDNAME(TAPE1) -
DS (INC (X111.X111) ) -
RENAME (X111.X111, X222.X222)
/*
Example #1.
000021 //STEP1 EXEC PGM=ADRDSSU,REGION=2048K
000022 //SYSPRINT DD SYSOUT=*
000023 //INDD1 DD DSN=THIS.IS.MY.PROD.BACKUP.G0001V00,DISP=SHR
000024 //SYSIN DD *
000025 RESTORE DATASET( -
000026 INCLUDE( -
000027 IDMS.PROD.FILE.NAME -
000028 )) -
000029 RENAME( -
000030 (IDMS.PROD.FILE.NAME,IDMS.TEST.FILE.NAME) -
000031 ) -
000032 INDDNAME(INDD1) -
000033 REPLACE -
000034 WAIT(2,2)
Example #2.
000009 //STEP1 EXEC PGM=ADRDSSU,REGION=2048K
000010 //SYSPRINT DD SYSOUT=*
000011 //INDD1 DD DSN=THIS.IS.MY.PROD.BACKUP.G0001V00,DISP=SHR
000012 //SYSIN DD *
000013 RESTORE DATASET( -
000014 INCLUDE( -
000015 IDMS.PROD.FILE.NAME -
000016 )) -
000017 RENAMEU(IDMX) -
000018 INDDNAME(INDD1) -
000019 REPLACE -
000020 WAIT(2,2)
Jeffery S. Shinn
Database Administrator
Ross Products Division - Abbott Laboratories
jeffre...@rossnutrition.com
"Mundy, Joseph"
<JEMUNDY@SOUTHERNC To: IDM...@LISTSERV.IUASSN.COM
O.COM> cc:
Sent by: IDMS Subject: Re: Sample ADRDSSU JCL
Public Discussion
Forum
<IDMS-L@LISTSERV.I
UASSN.COM>
06/26/2001 01:51