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

Answer Posted / raghu

proc sql;
select count(*) into : cnt from ds;
quit;

data ds1;
set ds(firstobs=%eval(&cnt-9) obs=&cnt);
run;

Is This Answer Correct ?    21 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the scrubbing procedures in sas?

577


describe the interaction table in sas di? : Sas-di

597


what is slowly changing dimension? : Sas-di

628


How many data types are there in SAS?

637


How can I remove header from output data set?

2066






What do you know about sas and what we do? : sas-grid-administration

608


How to test the debugging in sas?

612


How we can call macros with in data step? : sas-macro

618


Can you execute a macro within a macro? Describe. : sas-macro

678


Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?

1470


What would you change about your job?

1929


Explain the difference between using drop = data set option in set and data statement?

687


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


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

540


Tell e how how dealt with..

1775