Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am
No new posts Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 6 Wed Jul 26, 2017 7:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us