SAS Question:
Download Questions PDF

Suppose a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we need to pick the observations random order like
100obs,500obs,1020obs,1890obs,2565obs like that i need 100 obs in random order? how can we create this one?

Answer:

data A;
do slice = 100,500,1890,256,...100th;
set source point=slice;
output;
end;
stop;
run;

Download SAS Interview Questions And Answers PDF

Previous QuestionNext Question
In PROC PRINT, can you print only variables that begin with the letter “A”?What is validvarname and varnum? why we are using this options; explain with a syntax for this options?