Read GDG from old to latest

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

Read GDG from old to latest

Postby gnishuanish » Wed Oct 09, 2013 12:50 am

Hi All,

Is there any way to read GDG version from last to latest. For exapmle :- Suppose i have a GDG with 1 version and i want to merge all version from 10,9,8---1 like that.

Is there any way that we can do this.

Posts: 1
Joined: Wed Oct 09, 2013 12:45 am
Has thanked: 0 time
Been thanked: 0 time

Re: Read GDG from old to latest

Postby Akatsukami » Wed Oct 09, 2013 12:57 am

Note that you should be speaking of generations[b], not versions[/b]. Fortunately, we have seen so many software engineers make that error it is easily recognizable to us.

Do a LISTCAT on the base, parse the list for the GDS names, and fabricate (or, preferably, tailor) and submit JCL and control cards as suit your fancy. So many software engineers have asked this question that there are examples on this board of all the code necessary; search the SMS/VSAM forum and this forum for it.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Global moderator
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Read GDG from old to latest

Postby BillyBoyo » Wed Oct 09, 2013 3:53 am

If you have a look at the Smart DFSORT Tricks publication, you can find an example of doing it. ... rttrck.pdf
Global moderator
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Read GDG from old to latest

Postby vasanthagl » Wed Oct 16, 2013 11:24 am

Please try giving GDG base name will internally include all the Generation of that GDG as input. :ugeek:
Posts: 1
Joined: Wed Oct 16, 2013 11:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: Read GDG from old to latest

Postby NicC » Wed Oct 16, 2013 12:12 pm

Welcome vasanthagl.

What you suggested will allocate all the generations - but latest first and oldest last. The reverse sequence is needed.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Global moderator
Posts: 3026
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Return to JCL


  • Related topics
    Last post