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 / ashish
data op;
set qqq end=last;
if _n_=1 or last=1 then output;
run;
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?
What are the ways to do a “table lookup” in sas?
explain the use of % includes a statement in sas? : Sas-administrator
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
Mention what is the difference between nodupkey and nodup options?
What is the difference between proportion and average?
How can sas program be validated?
what techniques and/or procs do you use for tables? : Sas programming
how the sas basic syntax style described? : Sas-administrator
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
what is proc Index? and what is proc document?
Explain the purpose of retain statement.
Explain data_null_?
What are the ways in which macro variables can be created in sas programming?
Describe what are the different levels of administrative users in sas? : sas-grid-administration