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

Answer Posted / sumit

data new;
set old;
n = _N_;
run;

Proc sort data = new;
by descending n;
run;
Option OBS= 10;
Proc sort data = new (drop = n);
by descending n;
run;

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

532


Which statement does not perform automatic conversions in comparisons?

1200


For what purpose would you use the RETAIN statement?

1038


What is maximum storage capability of SAS?

904


What is the order of application for output data set options, input data set options and SAS statements?

1078






Can you execute a macro within a macro? Describe. : sas-macro

667


explain the main difference between the nodup and nodupkey options? : Sas-administrator

682


What do the mod and int function do? : Sas programming

569


What is the maximum and minimum length of macro variable

652


which features do you use to check the data validations and errors? : Sas-administrator

544


What versions of SAS have you used (on which platforms)?

1008


What sas features do you use to check errors and data validation?

679


What is the SAS data set?

672


what are the benefits of data integration? : Sas-di

531


Explain proc univariate?

604