Page 1 of 1

Retrieving GDG's as single data set

PostPosted: Wed Apr 20, 2011 11:15 am
by hkrkrishnakripa
Hi,

(i)
I have three generations in GDG,
MASTER.G123V00
MASTER.G124V00
MASTER.G125V00
Is it possible to retrieve all generations as a single data set using
// DD1 DSNAME=MASTER,DISP=SHR

(ii)
what does COPIES=3 will do in following JCL
// DD1 DSNAME=MASTER,COPIES=3 ?

Plz Help

Regards,
Hari

Re: Retrieving GDG's as single data set

PostPosted: Wed Apr 20, 2011 11:49 am
by BillyBoyo
hkrkrishnakripa wrote:...
Is it possible to retrieve all generations as a single data set using
// DD1 DSNAME=MASTER,DISP=SHR

(ii)
what does COPIES=3 will do in following JCL
// DD1 DSNAME=MASTER,COPIES=3 ?


No, DD1 would just get the latest.

COPIES= is for the number of printed output copies you want

Re: Retrieving GDG's as single data set

PostPosted: Wed Apr 20, 2011 12:09 pm
by NicC
Sorry, Bill, but if you code just the base name then all generations in the catlog will be conctenated - latest to oldest. Yes, COPIES is the number of copies to be put on the spool and does not apply to non-spool datasets.

Hari - you could could have found out the answer to the first question by experimenting and an answer to the second by referring to the manual (where you would also have found the answer to the first question).

Re: Retrieving GDG's as single data set

PostPosted: Wed Apr 20, 2011 2:53 pm
by Robert Sample
Hari -- be aware that referring to all generations by using the GDG base name retrieves the data in reverse generation order. In other words, (0) will be the first generation you get, then the (-1) generation, then the (-2) generation. If this is not what you want, using GDG base name is not the way to go -- and you'll ned to reference the GDG generations by concatenating them in the desired sequence.

Re: Retrieving GDG's as single data set

PostPosted: Wed Apr 20, 2011 3:12 pm
by hkrkrishnakripa
Thanks Bill,Nic & Robert.

Nic--I doesn't have any access to mainframes currently.Thanks for your reply

Re: Retrieving GDG's as single data set

PostPosted: Wed Apr 20, 2011 4:46 pm
by BillyBoyo
Thanks NicC. A pessimistic day for me.