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

what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming

694


what is slowly changing dimension? : Sas-di

628


do you prefer proc report or proc tabulate? Why? : Sas programming

579


What makes sas stand out to be the best over other data analytics tools?

591


How would you identify a macro variable?

653






describe about metadata object? : Sas-di

630


Describe a time when you were really stuck on a problem and how you solved it?

2086


Can you explain the process of calendar?

643


What is factor analysis?

663


what is snowflake schema? : Sas-di

698


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

560


What is a put statement?

668


How to sort in descending order?

799


it will become easy if uuu provide website linkssss and list of consultanciessssss

1535


what are the best practices to process the large data sets in sas programming? : Sas-administrator

544