We have a SAS data Set:
One
Now prepare your Base SAS and
Advance SAS Certification Exams with Online Mock tests: http://exam.sankhyana.com
One
Name | Age |
Ram | 27 |
Sita | 28 |
Radha | 21 |
Arjun | 20 |
Ram | 27 |
Radha | 21 |
Arjun | 20 |
Sita | 28 |
Bhim | 19 |
Required Output:(We need to remove the duplicates without changing the order of the observations)
Two
Name | Age |
Ram | 27 |
Sita | 28 |
Radha | 21 |
Arjun | 20 |
Bhim | 19 |
Data test;
ReplyDeleteinfile datalines dsd;
input Name $ Age ;
X+1;
datalines;
Ram,27
Sita,28
Radha,21
Arjun,20
Ram,27
Radha,21
Arjun,20
Sita,28
Bhim,19
;
run;
proc sort data = test
out = test1 nodupkey;
by name;
run;
Proc sort data = test1 out = test2(drop = X);
by X;
run;