Retrieving GDG's as single data set



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Retrieving GDG's as single data set

Postby hkrkrishnakripa » Wed Apr 20, 2011 11:15 am

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
hkrkrishnakripa
 
Posts: 2
Joined: Thu Nov 18, 2010 5:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Retrieving GDG's as single data set

Postby BillyBoyo » Wed Apr 20, 2011 11:49 am

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
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Retrieving GDG's as single data set

Postby NicC » Wed Apr 20, 2011 12:09 pm

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).
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Retrieving GDG's as single data set

Postby Robert Sample » Wed Apr 20, 2011 2:53 pm

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.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Retrieving GDG's as single data set

Postby hkrkrishnakripa » Wed Apr 20, 2011 3:12 pm

Thanks Bill,Nic & Robert.

Nic--I doesn't have any access to mainframes currently.Thanks for your reply
hkrkrishnakripa
 
Posts: 2
Joined: Thu Nov 18, 2010 5:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Retrieving GDG's as single data set

Postby BillyBoyo » Wed Apr 20, 2011 4:46 pm

Thanks NicC. A pessimistic day for me.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post