Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / sumit

data new;
set old;
n = _N_;
run;

Proc sort data = new;
by descending n;
run;
Option OBS= 10;
Proc sort data = new (drop = n);
by descending n;
run;

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why and when do you use proc sql?

1186


What is the function of Stop statement in a SAS Program?

1093


For what purposes have you used sas macros? : sas-macro

954


data data1; input dt account; format dt date9.; cards; 1745 1230 1756 1120 1788 1130 1767 1240 ; data data2; input startdt enddt total; format startdt date9. enddt date9.; cards; 1657 1834 12300 1557 1758 16800 1789 1789 12300 1788 1345 12383 1899 1899 13250 ; proc sql; create table data3 as select * from data1 as x left join data2 as y on x.dt>=y.startdt and x.dt<=y.enddt; quit; Here, we are getting cartision product. But,I want left join report consisting of this program. It should not get duplicate values. you can modify the program also.

2163


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

1005


what is the difference between nodup and nodupkey options? : Sas programming

1114


Hi Friends, Am Priya,new to your forum. am looking for Interview questions on SAS Platform Administration. I searched everywhere but I couldn't find them,please can anyone help me with complete interview questions normally everyone will face in the interviews on SAS Administration. am really facing problems in the interviews,am not able to answer any of their questions. I would really appreciate all your help if you can email the complete Interview Questions to priyafeb84@gmail.com Kindly awaiting for your reply with eager

2025


What are the difference between ceil and floor functions in sas?

1276


what is the different between functions and procs that calculate the same simple descriptive statistics? : Sas programming

994


Describe what are the different levels of administrative users in sas? : sas-grid-administration

982


What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?

1101


What do you know about sas data set?

1024


What is the difference between SAS functions and procedures?

1100


Explain proc sort?

1030


What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

1141