Dont know if this is possible. It is not a question of duplicates, instead it is a conditioning question
I can do this easy in Cobol but the requirement is instream SAS or Syncsort (I prefer SyncSort)
Need to count column 1 occurances where C2 or C3 changes:
if C2 (column 2) changes but (column 1) does not change this is an occurance to count
OR
when both Column 1 and Column 2 change - this also is an occurance to count.
Basically I am trying to find the number of times column 1 is repeated for different column2's
So in the following:
A1 C123C456
A2 C123C456
A3 C123C456
A1 C123C457
A1 C123C457
A2 C123C456
A1 C123C457
A3 C123C457
the result would be:
Count column added to output
A1 C123C456 3
A1 C123C457 3
A1 C123C457 3
A1 C123C458 3
A2 C123C456 2
A2 C123C457 2
A3 C123C456 1
A3 C123C456 1
I know it would include ifthen and restart for the counts but not sure how to tackle this