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
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
For a user to have access to a standard workspace server, is internal authentication alone is sufficient? : sas-grid-administration
Which command is used to save logs in the external file?
describe the interaction table in sas di? : Sas-di
What is your favorite all time computer book? Why?
What do you know about sas and what we do? : sas-grid-administration
What is the use of PROC gplot?
what is information maps?
what is star schema? : Sas-di
Give e an example of..
Explain the difference between informat and format with an example.
What is the basic structure of a sas program?
is data integration and etl programming is same? : Sas-di
what is the use of proc contents and proc print in sas? : Sas-administrator
Can you execute a macro within a macro? Describe. : sas-macro