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 are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming

717


For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration

533


Which command is used to save logs in the external file?

563


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

589


What is your favorite all time computer book? Why?

2044






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

597


What is the use of PROC gplot?

634


what is information maps?

1612


what is star schema? : Sas-di

637


Give e an example of..

1841


Explain the difference between informat and format with an example.

678


What is the basic structure of a sas program?

594


is data integration and etl programming is same? : Sas-di

574


what is the use of proc contents and proc print in sas? : Sas-administrator

601


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

667