Page 1 of 1

ADRDSSU

PostPosted: Thu Jun 25, 2015 10:41 pm
by deucalion0
Hello all, I hope you are well!!

I am struggling to figure out how to do something which I would assume is a simple task. I have tried looking through the IBM documentation, but I cannot seem to find a straight forward source which would explain the syntax for a RESTORE. I have tried this the whole day, and not managing so far, perhaps what I want to do cannot be done.

I have 3 datasets, I have dumped them. I want to restore them but with different names. For example:

Dumped datasets:

DATA.SET.ONE
DATA.SET.TWO
DATA.SET.THREE

I want to restore the dump to:

DATA.SET.FOUR
DATA.SET.FIVE
DATA.SET.SIX

Here is the control statement in my job from which I am trying to do this:

 RESTORE   DATASET (INCL(       -
                   **           -
                              ) -
                              ) -
           RENAMEU(**.**.**,    -
           **.**.FOUR)          -
           INDDNAME(DUMPIN)     -
           TGTALLOC(SRC)        -
           TOL(ENQF)             


I have experimented, and mainly get JCL errors.

If anyone can point me to a clear description of how the RESTORE statements work, that would be great!!


Thank you!!!

Re: ADRDSSU

PostPosted: Thu Jun 25, 2015 10:51 pm
by NicC
If it was a JCL error then show the JCL and the error message(s).

Re: ADRDSSU

PostPosted: Thu Jun 25, 2015 10:52 pm
by Karzos
Hi ,

We can use RENUNC option in JCL
//STEP      EXEC  PGM=ADRDSSU,REGION=6M,TIME=1440           
//SYSPRINT  DD SYSOUT=*                                     
//OU1    DD DISP=SHR,DSN=A041426.DUMP.OUTPUT                 
//SYSIN     DD    *                                         
  RESTORE DATASET( -                                         
       INCLUDE(A041426.TEST.NDM, -                           
               A041426.TEST1.NDM, -                         
               A041426.TEST2.NDM)) -                         
       INDDNAME(OU1) -                                       
       RENUNC((A041426.TEST.NDM,A041426.TEST.NDM.REST) -     
       (A041426.TEST1.NDM,A041426.TEST1.NDM.REST) -         
       (A041426.TEST2.NDM,A041426.TEST2.NDM.REST))           


In above code we dumped three datasets in A041426.DUMP.OUTPUT. While restoring we rename it to new name.

Re: ADRDSSU

PostPosted: Thu Jun 25, 2015 10:58 pm
by Robert Sample
Karzos, are you aware that RENAMEU and RENUNC are the same option of ADRDSSU?

deucalion0, what you posted that you want to do and what your ADRDSSU command does are completely different. Your posted ADRDSSU statement will attempt to rename ALL data sets with a low-level qualifier of .FOUR -- which Is not what you indicated you wanted to do. Try something like (untested):
RENUNC( (DATA.SET.ONE,DATA.SET.FOUR),(DATA.SET.TWO,DATA.SET.FIVE)....

Re: ADRDSSU

PostPosted: Thu Jun 25, 2015 11:44 pm
by deucalion0
Thank you for your feedback guys, it is appreciated!!

I tried your example Robert and I got it to work, so thank you!!!!

That is another JCL for my library now :)

Cheers!!!

Re: ADRDSSU

PostPosted: Fri Jun 26, 2015 3:35 am
by Robert Sample
Glad to hear you got it working.