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


Please Help Members By Posting Answers For Below Questions

What is the difference between %local and %global? : sas-macro

664


what is ae onset date n what is RDS

1931


How will you use the WHO Drug Dictionary for Reporting Clinical Trials?

1878


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


How would you invoke a macro? : sas-macro

548






what are the considerations when picking a SAS/STAT procedure?

2896


Compare sas with other data analytics tools.

577


how do you test for missing values? : Sas programming

577


How does proc sql work?

611


Enlist the functions performed by sas.

672


what is sas metadata repository? : Sas-bi

596


explain the concepts and capabilities of business object? : Sas-bi

538


how to debug and test the sas program? : Sas-administrator

569


Explain the difference between informat and format with an example.

678


Why and when do you use proc sql?

756