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
what is change analysis in sas di ? : Sas-di
what is slowly changing dimension? : Sas-di
How to import multiple xls files into sas. Out of those files, how to get different values from a single variable and how to find number of rows per value type? We can do this using group by for one xls file with proc sql. Was wondering how I can achieve this for multiple files at the same time. Any ideas?
if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming
Describe the function and untility of the most difficult SAS macro that you have written.
How to limit decimal places for the variable using proc means?
What are the default statistics that proc means produce?
What are the ways to do a “table lookup” in sas?
Describe the function and utility of the most difficult SAS macro that you have written?
What are the differences between proc means and proc summary?
What are the uses of sas?
Differences between where and if statement?
how to create the AE dataset by using SDTMIG specifications and SAP plan by using UNIX platform?
what is null hypothesis? why do you consider that?