On Jan 9, 4:57 pm, olivesec...@gmail.com wrote:
> I have a dataset which include 3 variables: id, i, j. For each id, the
> values for i and j may be 1~4. It is required that the combination of
> these 3 variables to be unique, which means, for example, the
> combination of id=2 i=3 j=1 can be on the dataset for only one time.
> If the combination shows up for two or more times on the datset, I
> need keep only the first obs this combination shows up and remove
> other obs it shows up.
> To solve the problem, I sort the dataset according to id i j. Then I
> only need to do iterations within each id. But I do not know how to do
> it by SAS. Can any people help me do it?
> Thanks a lot!!!
proc sort data=one out=WhatIWant nodupkey;
by id i j;