you have a data set like this.
data qqq;
input name $ total;
cards;
qq 22
ww 33
qq 22
ee 44
rr 33
ww 44
;
run;
and you want output like this.........
name total
qq 22
ww 44
Do it by data set step.
Answer Posted / singh.naveen409
proc sort data=qqq;
by name;
run;
options mlogic;
data www;
set qqq;
by name;
if first.name then serial=1
run;
data wwq (drop=serial);
set www;
if serial ne '1';
run;
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
What is the difference between SAS functions and procedures?
explain the main difference between the nodup and nodupkey options? : Sas-administrator
How would you determine the number of missing or nonmissing values in computations?
What will calendar procedure do?
What’s the difference between var b1 – b3 and var b1 — b3?
what type of graphs we will create(for 2+years candidates)?
What is a method to debug and test your SAS program?
how can you create zero observation dataset? : Sas programming
Mention what is SAS data set?
What is program data vector (pdv) and what are its functions?
what is sas and what are the functions? : Sas-administrator
how does sas handle missing values in functions? : Sas programming
What is the difference between using drop = data set option in data statement and set statement?
How would you define the end of a macro? : sas-macro
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming