Thank you, that was simple and works perfectly. There is a further complication, which I will probably handle by hand, but which I outline below in case any of you has some idea. For certain duplicate observations, one or more columns both have values in it, but they are not the same values. I include a SAS syntax with the same have dataset than before, with one more variable, V7, which for the duplicate obs A has the same value (x) in both lines while for duplicate obs D it has different values (x, y)on the two lines. SAS seems to choose one of the values, probably the value of the observation that comes first, I would guess, and of course it has no way of choosing which one is correct. What would be useful would be to get an output in which all the duplicate obs (that is, obs that have the same ID value) that have at least one column with different values, flagged. Eman data have;
infile datalines delimiter=' ';
input ID$ v1-v7;
datalines;
A 1 1 1 . . . x
A . . . 2 2 2 x
B 1 3 2 2 3 3 y
C 1 2 3 3 3 3 x
D 2 2 2 . . . x
D 2 2 2 3 3 3 y
; eman
... View more