how do i get last 10obs from a dataset when we don't know
about the number of obsevations in that dataset?
Answer Posted / shiva
data a;
do i=1 to 100;
output;
end;
run;
data data1;
set a nobs=tot;
if _n_ gt( tot-10) then output data1;
run;
Is This Answer Correct ? | 20 Yes | 4 No |
Post New Answer View All Answers
How do you debug and test your SAS programs?
explain the proc in sas? : Sas-administrator
what are the types of interactive display types? : Sas-bi
what is enterprise guide? What is the use of it? : Sas programming
what is the difference between unique key and primary key? : Sas-di
WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?
what is the Population you used in your project, is it ITT or PP?
what are the component of range? : Sas-bi
What are the data types does SAS contain?
how does sas handle missing values in assignment statements? : Sas programming
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
How to include or exclude specific variables in a data set?
Explain translate function?
what are the scrubbing procedures in sas? : Sas programming
is data integration and etl programming is same? : Sas-di