how do i get last 10obs from a dataset when we don't know
about the number of obsevations in that dataset?

Answer Posted / raghu

proc sql;
select count(*) into : cnt from ds;
quit;

data ds1;
set ds(firstobs=%eval(&cnt-9) obs=&cnt);
run;

Is This Answer Correct ?    21 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain the difference between proc means and proc summary?

665


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

569


Explain what is SAS informats?

617


How do you control the number of observations and/or variables read or written? Approximately what date is represented by the SAS date value of 730?

1156


Explain what is data step?

727






What is the difference between %put and symbolgen? : sas-macro

665


what do the mod and int function do? What do the pad and dim functions do? : Sas programming

610


What are the default statistics for means procedure?

638


how can you put a "trace" in your program? : Sas programming

572


Name some categories in sas 9? : sas-grid-administration

551


What is the basic syntax of a sas program?

660


why a stop statement is needed for the point= option on a set statement?

621


what is program data vector? : Sas-administrator

607


What system options would you use to help debug a macro? : sas-macro

634


how will you location sas platform applications available from web browser? : Sas-bi

536