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 / bharath
data qqq;
input name $ total;
cards;
qq 22
ww 33
qq 22
ee 44
rr 33
ww 44
;
run;
data abc;
set qqq;
if total in (22,44) and name in ('qq', 'ww');
proc print;
run;
data abc1;
set abc;
by name;
if first.name;
run;
proc print;
run;
Is This Answer Correct ? | 1 Yes | 2 No |
Post New Answer View All Answers
What do you code to create a macro? : sas-macro
What is Linear Regression?
what is the effect of the options statement errors=1? : Sas programming
hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?
What does PROC print, and PROC contents do?
What is the difference between %put and symbolgen? : sas-macro
Describe the function and utility of the most difficult SAS macro that you have written?
Difference between nodup and nodupkey options?
what are validation tools that are used in sas? : Sas-administrator
What was the last computer book you purchased? Why?
What would be the value of month at the end of data step execution and how many observations would be there?
do you need to know if there are any missing values? : Sas programming
Compare sas with other data analytics tools.
What are the implications?
AE datasets names? how many types?