how do i get last 10obs from a dataset when we don't know
about the number of obsevations in that dataset?
Answer Posted / pratik
Suppose we have dataset like sasuser.admit.
we dontknow how many obs are there in this dataset.
then we can use
Proc contents data=sasuser.admit n;
run;
it will come the total no of obs in this dataset.
after doing this you will get 21 obs are there.
data dsn1;
set sasuser.admit(firstobs=12 obs=21);
run;
proc print data=dsn1;
run;
then you will get last 10 obs.
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
What is maximum number of rows and cols can be handled in SAS?
Which command is used to save logs in the external file?
For clinical entire study how many tables will create approx?
If you could design your ideal job, what would it look like?
hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana
What is the different between functions and PROCs that calculate the same simple descriptive statistics?
which features do you use to check the data validations and errors? : Sas-administrator
How do you use the do loop if you don’t know how many times you should execute the do loop?
How to create list output for cross-tabulations in proc freq?
What is the use of the %include statement?
Explain proc sort?
How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?
What do you know about sas and what we do? : sas-grid-administration
How would you determine the number of missing or nonmissing values in computations?
Mention the validation tools used in SAS?