View previous topic :: View next topic
|
Author |
Message |
chidambaram
New User
Joined: 16 Oct 2007 Posts: 11 Location: Chennai
|
|
|
|
Dears,
Can any one guide me how can I do my below requirement using DFSORT.
Input1 :
aaaa
bbbb
ccccc
Input 2 :
aaaa
ccccc
aaaa
dddd
Output :
aaaa - 2
bbbb - 0
ccccc - 1
I need to read my input 1 and I need to get the count of occurance of that record in file2.
Chip |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You mean you want the count of occurrences of each value in file2 that appears in file1?
What is the RECFM and LRECL of each input file?
Can file1 have dups within it?
Why do you have a 0 count for bbbb - that value isn't in file2 (it's only in file1). I would think you'd want a 0 count for dddd which is in file2 but not in file1.
Please give a clearer explanation of the rules for getting from input to output. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Frank,
I think the OP wants counts for what is in file1, that is for every record in file1, a count is required.
dddd is not in file1
bbbb is in file1 and as there are no matching records in file2, the count will be 0.
Gerry |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Gerry,
That would be my "guess" too, but I want the OP to confirm that and answer all of my questions before I provide a solution. (I'm on vacation and don't have time to guess.) |
|
Back to top |
|
|
|