I'm trying to create a report by sorting a VB file and removing duplicates. However, the report should include the number of duplicates per control field. Can anyone advise? Is it possible to use SEQNUM to keep a counter per unique key?
i.e.
SORT FIELDS=(1,5,CH,A)
SUM FIELDS=NONE
Input Dataset
AAAAA
BBBBB
BBBBB
CCCCC
CCCCC
CCCCC
DDDDD
DDDDD
DDDDD
DDDDD
...
Output Dataset
AAAAA 001
BBBBB 002
CCCCC 003
DDDDD 04
Would the solution change if there were multiple fields in the SORT stmt?