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
What do the SAS log messages "numeric values have been converted to character" mean?
What is the sas data set? : sas-grid-administration
How substr function works in sas?
Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager
What are the automatic variables for macro? : sas-macro
Tell me about % include and % eval? : sas-macro
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
In sas, what are the areas that you are most interested in? : sas-grid-administration
what is the difference between calculating the 'mean' using the mean function and proc means? : Sas programming
what are the considerations when picking a SAS/STAT procedure?
name the scheduler for scheduling job and explain the scheduler? : Sas-di
How would you define the end of a macro?
What is the difference between match merge and one to one merge?
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya
how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming