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 are the data types does SAS contain?
What are the default statistics for means procedure?
Explain proc univariate?
what is treatment emergent events and treatment emregent adverse event
How do you specify the number of iterations and specific condition within a single do loop?
Give e an example of..
what are the benefits of data integration? : Sas-di
Differentiate between proc means and proc summary.
How is character variable converted into numeric variable and vice versa?
explain about data integrator metadata reports? : Sas-di
what are the component of range? : Sas-bi
how will you locate the sas platform applications? : Sas-bi
hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?
Are you involved in writing the inferential analysis plan? Tables specifications?
what are informats in sas? : Sas-administrator