You have a data set of 100 observations,how can you
restrict the output so that the output has only data from
row no. 10 to row no. 20

Answer Posted / suri

output window

1)proc print data=ds1(firstobs=10 obs=2);
run;

2)data ds1;
set ds(firstobs=10 obs=20);
run;
3)data ds1;
set ds;
where _n_ in(10:20);
run;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you define proc in sas? : sas-grid-administration

678


What is the difference between one to one merge and match merge? Give an example.

577


I have a dataset concat having variable a b & c. How to rename a b to e & f?

583


What are symget and symput? : sas-macro

735


What is the difference between %local and %global? : sas-macro

673






what r the job openings SAS for fresher graduates !

2021


Explain the difference between informat and format with an example.

689


What’s the difference between var b1 – b3 and var b1 — b3?

837


WHAT IS SAS WEB SERVICE and what are the steps to create an xml service ?

2270


How many data types are there in SAS?

637


how would you create multiple observations from a single observation? : Sas programming

572


What can you learn from the SAS log when debugging?

921


what is change analysis in sas di ? : Sas-di

607


Explain bmdp procedure?

616


Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?

1771