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
I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com
What do the PUT and INPUT functions do?
what is transformation in sas data integration? : Sas-di
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
Define run-group processing?
what is business intelligence? : Sas-bi
What is the use of stop statement?
What is the basic syntax of a sas program?
How will you generate test data with no input data?
Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?
how to remove duplicates using proc sql?
What are the uses of sas?
How many ways to overcome a missing values???
Mention few capabilities of sas framework.
what is scheduling and how will u implement it. In scheduling 5 jobs r running if there is an error occured at 3rd job and how will u check and waht necessary steps will u take not to repeat the same mistake