how do i get last 10obs from a dataset when we don't know
about the number of obsevations in that dataset?

Answer Posted / its me

Shiva, ur answer is also correct . and here goes another
one dear..

data W;
set X;
if _n_ > 95 then output;
run;


As the total no. of obs are 100, the last five observations
will be be in ur output dataset..
Cheers!!!

Is This Answer Correct ?    1 Yes 14 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between informat and format?

646


how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5

1664


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

4916


What makes sas stand out to be the best over other data analytics tools?

591


Where do you use proc means over proc freq?

567






how many types prompting framework can be broken down to? : Sas-bi

637


Difference between sum function and using “+” operator?

606


What Proc glm does?

611


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

1668


explain about various caches available in data integrator? : Sas-di

584


What is the basic structure of the SAS base program?

692


What is the role of administrative users? : sas-grid-administration

663


Assuming {et} is randomly drawn from N(0,1) and e0 = 0, generate 200 observations of xt = et − 0.5e(t−1) and draw a line graph of xt.

1465


How to limit decimal places for the variable using proc means?

606


what are the scrubbing procedures in sas? : Sas programming

835