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 

Duplicate records count

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


Joined: 19 Jan 2004
Posts: 27
Topics: 8

PostPosted: Mon Sep 06, 2004 5:08 am    Post subject: Duplicate records count Reply with quote

Hi.
I am eliminating duplicates from a file using SYNCSORT using the statement below.
//SYSIN DD *
SORT FIELDS=(139,9,CH,A)
SUM FIELDS=NONE
/*

Is it possible to find the number of duplicates of each field.
For example, if the input file had the records
AAA
AAA
BBB
BBB
CCC
CCC
CCC

the sorted file would may have the following records:
AAA
BBB
CCC

What I would like to do is find out how to output
2 duplicates of AAA
2 duplicates of BBB
3 duplicates of CCC

Please help!
I have tried
SUM FIELDS=NONE,XSUM
but it does not run, is there a count utility or any other way to achieve this?
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Sep 06, 2004 6:21 am    Post subject: Reply with quote

Fin,

please search before posting. This topic has been discussed earlier. check the following links.

http://www.mvsforums.com/helpboards/viewtopic.php?t=1733&highlight=count

http://www.mvsforums.com/helpboards/viewtopic.php?t=705&highlight=count

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
Fin
Beginner


Joined: 19 Jan 2004
Posts: 27
Topics: 8

PostPosted: Wed Sep 08, 2004 5:28 am    Post subject: Reply with quote

Kolusus, thanks for pointing me in the right direction.
Much appreciated.
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