JOIN on 3 files ?



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

JOIN on 3 files ?

Postby syannigeri » Sun Jan 30, 2011 11:35 pm

Hi Team,

Can we perform Join on 3 files at a time and get the matching records??
Also, is it possible to join N number of files using JOIN KEYS ??

Thanks
Shankargouda
syannigeri
 
Posts: 20
Joined: Tue Dec 22, 2009 11:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JOIN on 3 files ?

Postby dick scherrer » Mon Jan 31, 2011 2:19 am

Hello,

How many records are in each of the files?

The documentation mentions 2 files.

What does "matching" mean to you for this question? That the "key" exists in all 3 files or that the key exists in mor than one file?
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: JOIN on 3 files ?

Postby Alissa Margulies » Mon Jan 31, 2011 9:23 pm

SyncSort for z/OS supports joining 2 files at a time. Once you JOIN 2 of the files, you can use that output to JOIN with the 3rd file.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: JOIN on 3 files ?

Postby syannigeri » Tue Feb 01, 2011 12:02 am

ohh !! I am now joining 2 files and then merging with rest... CPU is burning like anything..
So was thinking of alternatives...

May be i will move to COBOL. I can merge 3 files in a single shot with less CPU cost..

Thanks
Shankargouda
syannigeri
 
Posts: 20
Joined: Tue Dec 22, 2009 11:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JOIN on 3 files ?

Postby Alissa Margulies » Tue Feb 01, 2011 1:00 am

If you are simply merging the records from 3 files into a single file, then SyncSort can do that in one step. But if you require actual JOIN processing, then 2 files at a time is the limit. What exactly are you attempting to do? Please provide sample input and output records and I would be happy to futher assist you. Please also answer Dick's question regarding how you are defining "matching".
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: JOIN on 3 files ?

Postby syannigeri » Tue Feb 01, 2011 11:20 pm

I have 3 files. I need to match on Account number.. Assume the account number is first 13 digits..
If it matches.. Then need to Append the as below.

Account number; First file data;Second file data;3rd file data.

Will this be possible in SORT ?

Thanks
Shankargouda
syannigeri
 
Posts: 20
Joined: Tue Dec 22, 2009 11:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JOIN on 3 files ?

Postby Alissa Margulies » Wed Feb 02, 2011 12:08 am

Can there be duplicate account numbers in any of the files?
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times

Re: JOIN on 3 files ?

Postby syannigeri » Wed Feb 02, 2011 12:22 am

No, I will take care of Removing them.
Will it become complex if Duplicates are there ?
syannigeri
 
Posts: 20
Joined: Tue Dec 22, 2009 11:27 pm
Has thanked: 0 time
Been thanked: 0 time

Re: JOIN on 3 files ?

Postby Alissa Margulies » Wed Feb 09, 2011 3:02 am

If you perform a 2-step JOIN (not a JOIN and then MERGE), then I would not expect the CPU time to spike as you have described. If you would like further tuning assistance with this SORT application, please feel free to contact Syncsort Mainframe Product Services directly at zos_tech@syncsort.com or call +1(201)930-8260.
Alissa Margulies
Syncsort Mainframe Product Services
201-930-8260
zos_tech@syncsort.com
Alissa Margulies
Global moderator
 
Posts: 369
Joined: Tue Feb 26, 2008 11:15 pm
Location: USA
Has thanked: 1 time
Been thanked: 3 times


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post