Removing duplicates in SPSS when three of the columns match each other

#1
I have a large dataset in SPSS with approximately 60 columns and about 100,000 rows. I would like to remove cases where the values in three columns exactly match between two different cases. I have provided an example below to illustrate my request.

Original Dataset:

03/29/2012 573033 38340 A1
03/29/2012 573033 43065 A1
04/03/2012 574171 36579 B1
02/02/2006 574241 41547 B5
04/08/2011 574245 39210 Z9
10/02/2003 574533 39108 Q6
04/13/2012 574573 43117 Q6
01/19/2011 574575 36520 H8

In this case if the first, second and fourth columns match between any case, they will be deleted. After the script is run, the first two case in the above dataset would be deleted.
 
#2
I would sort by the three variables to ensure that any of the individuals with duplicate values were adjacent to each other. If the original order is important, before sorting, give each subject an original order value in a new variable (ORIG_ORD) based on one of the functions that does that ($CASENUM).

Create a new variable, say "DUP_Test". Give it all values of 0.

Then use the LAG function. LAG for each subject and variable is the preceding subject in the list. So you can basically say (in code or with the pull down menu for computing things):

IF (A = LAG(A) & B = LAG(B) & C = LAG(C))DUP_Test = 1.

You should now have a variable that is 0 for all unique entries and the first time a duplicated line appears, and 1 for each of the succeeding duplicated lines.

Now Create a new order variable for the subjects in the current order. Sort on it, in the reverse order, so now you end up with the duplicated line that has a 0 still (was the first of each set before) now as the *bottom* of the set. Repeat the IF statement. Now all duplicated lines should have 1's. CHECK A BUNCH!

Select or filter for the ones with 0 on the DUP_Test line.

Let me know if this works. It seems to in a small file I created.

Ed