1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
* (best method) to delete duplicate records in a file (identical records).
SORT CASES BY ALL.
AGGREGATE OUTFILE=* /PRESORTED /BREAK=ALL /N=n.
* The above syntax is capable to handle up to 4,000 variables.

* (alternative method).
SORT CASES BY all.
MATCH FILES	FILE=*	/BY all /FIRST= first.
SELECT IF first.

* To delete records with identical V1 values.
SORT CASES BY v1.
MATCH FILES FILE=* /BY v1 /FIRST = first .
SELECT IF first.

* To delete records with identical var1, var2 and var3.
SORT CASES BY var1 var2 var3.
ADD FILES FILE=* /BY var1 var2 var3 /FIRST=first.
SELECT IF first.