View previous topic :: View next topic
|
Author |
Message |
cvijay784 Warnings : 1 New User
Joined: 18 Jun 2008 Posts: 54 Location: Colombo
|
|
|
|
Hi,
My requirement is compare two files having same LRECL(1850) based on the key value using Syncsort. ( but in the two files the key positions are different)
In my final output, i want only the matched records from file1.
I tried using the below Joinkeys fuction but am getting the matched records from both the files.
JOINKEYS FILE=F1,FIELDS=(1,22,A,1166,1,A,1827,3,A)
JOINKEYS FILE=F2,FIELDS=(1,22,A,23,1,A,24,3,A)
REFORMAT FIELDS=(F1:1,1850)
SORT FIELDS=COPY
Could anybody tell me whether i need to include any condition to report only the matched records from file1.
Thanks in advance!!! |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
cvijay, Post topic in relevant forum to get answer faster...
Why it is in CICS forum? |
|
Back to top |
|
|
cvijay784 Warnings : 1 New User
Joined: 18 Jun 2008 Posts: 54 Location: Colombo
|
|
|
|
Yes..its an oversite error while submiitting the query..
Any reply pls to the query.. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Quote: |
I tried using the below Joinkeys fuction but am getting the matched records from both the files. |
Your requirement is not clear. If it is a "match", it's quite natural that you have the key in both the files and the control cards shown by you give ONLY the MATCHED records. And since you use REFORMAT FIELDS=(F1:1,1850), you should be getting File-1 records which has a match in File-2. Is n't that you're trying to achieve ?
If not, just show a few sample input records from your input and the output records you expect from it(only relevant fields). |
|
Back to top |
|
|
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
you can try file aid..
in which you can get the records you need only from which file..
that would be simple |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
r2k1984 wrote: |
you can try file aid..
in which you can get the records you need only from which file..
that would be simple |
But only if FileAid is installed at your site |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
r2k1984 wrote: |
in which you can get the records you need only from which file..
that would be simple |
With file-aid, can we do a two-file match and extract matching or non-matching records from either of the files, like SyncSort JOINKEYS? |
|
Back to top |
|
|
|