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
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 are the advantages of using sas?
How do you specify the number of iterations and specific condition within a single do loop?
I need level 2 to 5 sas using companies in india
Explain the purpose of retain statement.
What are the data types does SAS contain?
how the sas basic syntax style described? : Sas-administrator
What is the difference between input and infile statement?
Hi, If anyone has base SAS certification dumps, please share.
Name some categories in sas 9? : sas-grid-administration
For what purposes have you used sas macros? : sas-macro
Mention what is PROC in SAS?
what is the difference between infile and input? : Sas-administrator
what is broad cast agent? : Sas-bi
What’s the difference between var b1 – b3 and var b1 — b3?