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 difference between %local and %global? : sas-macro
what is ae onset date n what is RDS
How will you use the WHO Drug Dictionary for Reporting Clinical Trials?
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)?
How would you invoke a macro? : sas-macro
what are the considerations when picking a SAS/STAT procedure?
Compare sas with other data analytics tools.
how do you test for missing values? : Sas programming
How does proc sql work?
Enlist the functions performed by sas.
what is sas metadata repository? : Sas-bi
explain the concepts and capabilities of business object? : Sas-bi
how to debug and test the sas program? : Sas-administrator
Explain the difference between informat and format with an example.
Why and when do you use proc sql?