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 / alok karan
data qq;
do i=1 to n by n-1;
set qqq point=i nobs=n ;
output;
end;
stop;
proc print data=qq;
run;
/*Above is more efficient program to know the first and last observation */
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of trailing @ and @@? How do you use them?
Approximately what date is represented by the SAS date value of 730?
How do you specify the number of iterations and specific condition within a single do loop?
what is sas data set?
How to create list output for cross-tabulations in proc freq?
what are validation tools that are used in sas? : Sas-administrator
How can sas program be validated?
Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.
What is the function of Stop statement in a SAS Program?
What is substr function?
How do you use the do loop if you don’t know how many times you should execute the do loop?
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
what r the job openings SAS for fresher graduates !
how many types prompting framework can be broken down to? : Sas-bi
What are the special input delimiters used in SAS?