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
what is the use of proc sql? : Sas programming
explain the concepts and capabilities of business object? : Sas-bi
How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?
Hello Friends, am new to this forum and am not good at sas progarmming. please can any one of you send me couple of sample large sample SAS Jobs which can you use 200 MB of data and other sas job upto 25GB of data. am doing a performance testing on our legacy systems and new upgraded system. I would really appreciate if you can do me this favor Thank you Priya
what can you learn from the sas log when debugging? : Sas programming
Of all your work, where have you been the most successful?
How will you generate test data with no input data?
Tell e how how dealt with..
How to read an input file in sas?
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?
What Proc glm does?
What is slibref?
Where do you use proc means over proc freq?
What is the function of Stop statement in a SAS Program?
how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5