Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sample ADRDSSU JCL

6,514 views
Skip to first unread message

Mundy, Joseph

unread,
Jun 26, 2001, 1:53:44 PM6/26/01
to
Bill,

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

unread,
Jun 26, 2001, 2:08:59 PM6/26/01
to
NO NO NO - according to my recollections, RENAMEU and REPLACE may not
coexist in the same DFDSS execution

Chris Hoelscher
IDMS Database Administrator
Humana Inc
500 West Main Street
NCT-20
Louisville KY 40202
502-580-2538

Mark Caffrey

unread,
Jun 26, 2001, 2:18:40 PM6/26/01
to
As I recall, the JCL sent below will restore the production file to the
test file if it DOES NOTalready exist. If the test file already exists, I
think the JCL will fail. I tried this a few years back, and if I remember
correctly, there is no way to restore one file name to another that already
exists using ADRDSSU, unless there are some new parameters.
Mark Caffrey

"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

Mundy, Joseph

unread,
Jun 26, 2001, 2:26:48 PM6/26/01
to
Ok, ok, ok... I concede.

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

unread,
Jun 26, 2001, 2:46:18 PM6/26/01
to
Joe is correct in saying this involves a 2 step method. At our site we
restore the dataset to another name using the RENAMEU and CATALOG options.
Then we copy the restored/renamed dataset to the dataset in question. The
second step can be done anyway you chose (IEBGENER,SORT,etc.)

__________________________________
Larry Parker
Harvard University Information Systems
1730 Cambridge St.
Cambridge, MA 02138
Email: larry_...@harvard.edu
Phone: (617) 495-3666

Kay Rozeboom

unread,
Jun 26, 2001, 3:25:49 PM6/26/01
to
Here is the JCL we use to restore a file under a new name.
'X111.X111' is the old name (what it was backed up as).
'X222.X222' is the new name.
The current version of 'X111.X111' will not be affected.

//******************************************************************
//* *
//* 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)
/*

Jeffery S. Shinn

unread,
Jun 26, 2001, 3:35:48 PM6/26/01
to
Here are 2 examples:
First example is for restoring a file to a different named file using
RENAME.
Second example is for restoring a file to different named file ( only
renaming the first node of the file ) using RENAMEU.

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

Bill Allen

unread,
Jun 26, 2001, 5:17:19 PM6/26/01
to
Thanks Joe!
0 new messages