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


Please Help Members By Posting Answers For Below Questions

Differentiate between sas functions and sas procedures.

738


What is the length assigned to the target variable by the scan function?

771


Explain what is data step?

814


AE datasets names? how many types?

2151


what is ae onset date n what is RDS

2019






What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

823


Explain the use of proc print and proc contents?

635


Explain the difference between using drop = data set option in set and data statement?

782


How we can create SAS USER DEFINED CODE?

1718


What are the functions used for character handling?

746


what do the sas log messages "numeric values have been converted to character" mean? : Sas programming

643


in the flow of data step processing, what is the first action in a typical data step? : Sas programming

740


How will you use the WHO Drug Dictionary for Reporting Clinical Trials?

1982


What system options would you use to help debug a macro? : sas-macro

737


How do you convert basic cube to transaction cube and transaction cube to basic cube?

1877