Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Record occurance count

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Record occurance count
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 Moderator


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

PostPosted: Wed Dec 16, 2009 6:44 am    Post subject:
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: 1703
Location: Australia

PostPosted: Wed Dec 16, 2009 7:13 am    Post subject:
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 Moderator


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

PostPosted: Wed Dec 16, 2009 11:00 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us