Merging two GDG's



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

Merging two GDG's

Postby pushkal2gud » Sat Apr 21, 2012 12:58 am

Hi Forum,

I want to merge two GDG into a PS file in the following pattern.

GDG1
Apple
Banana
Canada
Dog

GDG2
Banana
Canada
Dog

Merged PS
Apple

It means that when the two GDG's are merged then it should exclude the same data.

Any help would be appreciated.

Regards
Pushkal
pushkal2gud
 
Posts: 15
Joined: Fri Apr 20, 2012 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Merging two GDG's

Postby dick scherrer » Sat Apr 21, 2012 1:13 am

Hello and welcome to the forum,

There is no reason to treat gdg generations any differently than other sequential files. . .

Look in the forum for topics that mention JOINKEYS in the discussion. There are multiple examples available.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Merging two GDG's

Postby BillyBoyo » Sat Apr 21, 2012 1:16 am

It is irrelevant that the input is two generations of the same GDG. They are just sequential files for all that anything is known by a program.

It would be a very simple JOINKEYS application for your Sort product.

Is that really the data, or are you going to produce the actual code afterwards?

What are the RECFMs of the inputs and output?

What is your Sort product? If you don't know, look at the messages out of a Sort step. If they start ICE it is DFSORT, if WER it is Syncsort.

'evening Dick :-)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Merging two GDG's

Postby dick scherrer » Sat Apr 21, 2012 6:47 pm

'Mornin' Billy,

I was on the way out when we last posted<g> It was mid-afternoon here.

Have a good one!

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Merging two GDG's

Postby pushkal2gud » Wed Apr 25, 2012 3:04 am

Hi dick and billy,

Thanks for your help. I was able to do it using joinkeys. It was a new concept for me.

Regards
Pushkal
pushkal2gud
 
Posts: 15
Joined: Fri Apr 20, 2012 7:13 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Merging two GDG's

Postby dick scherrer » Wed Apr 25, 2012 3:07 am

Good to hear it is working - thank you for letting us know :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post