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 you can read the variables that you need?
do you prefer proc report or proc tabulate? Why? : Sas programming
why is a stop statement needed for the point=option on a set statement? : Sas programming
how can you put a "trace" in your program? : Sas programming
in the flow of data step processing, what is the first action in a typical data step? : Sas programming
Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro
Explain append procedure?
Explain by-group processing?
How necessary is it to be creative in your work?
what is treatment emergent events and treatment emregent adverse event
What is the role of administrative users? : sas-grid-administration
If you were told to create many records from one record, show how you would do this using array and with proc transpose?
what are 5 ways to perform a table lookup in sas? : Sas-administrator
What is PROC in SAS?
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming