IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Record occurance count


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chidambaram

New User


Joined: 16 Oct 2007
Posts: 11
Location: Chennai

PostPosted: Wed Dec 16, 2009 12:08 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Dec 16, 2009 6:44 am
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Wed Dec 16, 2009 7:13 am
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Dec 16, 2009 11:00 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top