i have 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 Posted / suri

1)data ds2;
do i=100,1020,1890,2565;
set ds1 point=i;
output;
end;
stop;
run;

2)data ds2;
set ds1;
where _n_ in(100,1020,1890,2565);
run;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is ae onset date n what is RDS

1939


What are SAS/ACCESS and SAS/CONNECT?

634


explain what is factor analysis? : Sas-administrator

602


what is metadata? : Sas-bi

600


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

604






Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??

2096


How do you delete duplicate observations in sas?

577


What do you code to create a macro? : sas-macro

582


do you prefer proc report or proc tabulate? Why? : Sas programming

575


Explain how you can debug and test your SAS program?

565


What are pdv and it functions?

602


Explain the main difference between the sas procedures and functions? : Sas-administrator

540


what are several options for creating reports in web report studio? : Sas-bi

631


What are the differences between proc means and proc summary?

602


What are the uses of sas?

709