View previous topic :: View next topic |
Author |
Message |
Fin Beginner
Joined: 19 Jan 2004 Posts: 27 Topics: 8
|
Posted: Mon Sep 06, 2004 5:08 am Post subject: Duplicate records count |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
Fin Beginner
Joined: 19 Jan 2004 Posts: 27 Topics: 8
|
Posted: Wed Sep 08, 2004 5:28 am Post subject: |
|
|
Kolusus, thanks for pointing me in the right direction.
Much appreciated. |
|
Back to top |
|
 |
|
|