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


Please Help Members By Posting Answers For Below Questions

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)?

1203


What are the ways to do a “table lookup” in sas?

589


explain the use of % includes a statement in sas? : Sas-administrator

543


what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming

570


Mention what is the difference between nodupkey and nodup options?

595






What is the difference between proportion and average?

2753


How can sas program be validated?

575


what techniques and/or procs do you use for tables? : Sas programming

573


how the sas basic syntax style described? : Sas-administrator

599


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

1466


what is proc Index? and what is proc document?

1993


Explain the purpose of retain statement.

598


Explain data_null_?

608


What are the ways in which macro variables can be created in sas programming?

564


Describe what are the different levels of administrative users in sas? : sas-grid-administration

596