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


Please Help Members By Posting Answers For Below Questions

What do you code to create a macro? : sas-macro

592


What is Linear Regression?

692


what is the effect of the options statement errors=1? : Sas programming

600


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?

1692


What does PROC print, and PROC contents do?

739






What is the difference between %put and symbolgen? : sas-macro

684


Describe the function and utility of the most difficult SAS macro that you have written?

2037


Difference between nodup and nodupkey options?

643


what are validation tools that are used in sas? : Sas-administrator

604


What was the last computer book you purchased? Why?

1923


What would be the value of month at the end of data step execution and how many observations would be there?

591


do you need to know if there are any missing values? : Sas programming

563


Compare sas with other data analytics tools.

593


What are the implications?

1190


AE datasets names? how many types?

2084