Join on multiple fields



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

Join on multiple fields

Postby mainframe_novice » Tue May 25, 2010 11:21 pm

Is it possible to join 2 files based on multiple fields ?
So far I have used only one field to do the join on 2 files .

Also the how would be a performance if we are comparing the 2 files having a million records each .

I would appreciate if simple example is posted to demonstrate how the join based on multiple fields work .
mainframe_novice
 
Posts: 35
Joined: Tue Apr 27, 2010 1:29 am
Has thanked: 0 time
Been thanked: 0 time

Re: Join on multiple fields

 

Re: Join on multiple fields

Postby Alissa Margulies » Wed May 26, 2010 12:00 am

Joining on multiple fields works the same as joining on a single field.
For example:
JOINKEYS FILES=F1,FIELDS=(1,5,A,26,7,A)
JOINKEYS FILES=F2,FIELDS=(1,5,A,26,7,A)

If you need further assistance, then please provide more detailed information regarding your requirements, such as RECFM and LRECL of each input file, position and lengths of KEY fields to be JOINed, and what you want included in the output records.
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: 1 time

Re: Join on multiple fields

Postby mainframe_novice » Wed May 26, 2010 1:03 am

Thanks for your reply .

I have around 8-10 fields which can be used in Join .

I was curious about performance .
How it would work when 2 files involved have million rows each .
mainframe_novice
 
Posts: 35
Joined: Tue Apr 27, 2010 1:29 am
Has thanked: 0 time
Been thanked: 0 time

Re: Join on multiple fields

Postby Alissa Margulies » Wed May 26, 2010 1:12 am

Its not the number of records in each file that you need to focus on, but rather the number of duplicate keyed records. The file with more duplicate keyed records should be coded as SORTJNF1.
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: 1 time


Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post