Hi,
I have an indexed SAS dataset. I want to find out if there is a way to remove the duplicate obs on this dataset by retaining the index on the dataset or without disturbing the SAS dataset.
data x(index = (trk = (a b)));
input a b c;
cards;
1 2 3
1 2 3
3 4 5
5 6 7
5 6 7
;
run;
I want to modify this dataset DS with the index "trk" retained and deleting the dup obs on a,b,c variables.
i.e., my new dataset DS should look like this with the index TRK as it. I shouldn't recreate this index once the dups are removed. Duplicate obs should be removed from the indexed dataset.
New dataset:
a b c
1 2 3
3 4 5
5 6 7
Any help would be really appreciated.
Thanks.
Sudha
I have an indexed SAS dataset. I want to find out if there is a way to remove the duplicate obs on this dataset by retaining the index on the dataset or without disturbing the SAS dataset.
data x(index = (trk = (a b)));
input a b c;
cards;
1 2 3
1 2 3
3 4 5
5 6 7
5 6 7
;
run;
I want to modify this dataset DS with the index "trk" retained and deleting the dup obs on a,b,c variables.
i.e., my new dataset DS should look like this with the index TRK as it. I shouldn't recreate this index once the dups are removed. Duplicate obs should be removed from the indexed dataset.
New dataset:
a b c
1 2 3
3 4 5
5 6 7
Any help would be really appreciated.
Thanks.
Sudha