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
explain about sas business intelligence? : Sas-bi
Describe the ways in which you can create a macro variable?
What is the difference between nodupkey and nodup options?
What is the basic structure of a sas program?
in the flow of data step processing, what is the first action in a typical data step? : Sas programming
what are the scrubbing procedures in sas? : Sas programming
where to use sas business intelligence? : Sas-bi
List out some key concept of SAS
what are the component of range? : Sas-bi
explain about various caches available in data integrator? : Sas-di
what is the primary data source for the wrs? : Sas-bi
How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?
what is program data vector? : Sas-administrator
What is a put statement?
What are the data types does SAS contain?