MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

count of records fulfilling certain criteria

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
Gaurit
Beginner


Joined: 05 Apr 2006
Posts: 2
Topics: 1

PostPosted: Mon May 08, 2006 9:44 am    Post subject: count of records fulfilling certain criteria Reply with quote

Hi,
I have a FB file which has the following data

AAAA 1
AAAA 1
AAAA 2
BBBB 1
BBBB 1
CCCC 1

I want the count of records for unique values of data.

The output for the above should be
AAAA 1 record count - 2
AAAA 2 record count - 1
BBBB 1 record count - 2
CCCC 1 record count - 1

All I need is the key and the record count. It does not matter how the record count is displayed as long as it is on the file along with the key. I need this for further processing. I was wondering if sort would help with this. The other way would be writing out a 1 for every record and then summing it up.

I came across Trailer1 = Count, but I am not aware if that will help me in this situation. I did try to look for something that would serve my purpose, but did not find anything.

Please let me know if there is some way out.

Thanks,
_________________
Gauri
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Mon May 08, 2006 9:49 am    Post subject: Reply with quote

Gaurit,

Please SEARCH before posting . Check these links

http://www.mvsforums.com/helpboards/viewtopic.php?t=6007&highlight=sections

http://www.mvsforums.com/helpboards/viewtopic.php?t=4703&highlight=sections

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Gaurit
Beginner


Joined: 05 Apr 2006
Posts: 2
Topics: 1

PostPosted: Mon May 08, 2006 1:35 pm    Post subject: Reply with quote

Kolusu,
I did search around but did not see this example. Thanks for pointing it out!

Thanks,
Gauri
_________________
Gauri
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group