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
which date functions advances a date time or date/time value by a given interval? : Sas programming
What system options would you use to help debug a macro? : sas-macro
how to do user inputs and command line arguments in sas?
What is the purpose of _character_ and _numeric_?
What are the functions which are used for character handling functions?
How do you delete duplicate observations in sas?
How do you use the do loop if you don’t know how many times you should execute the do loop?
explain the function of substr in sas? : Sas-administrator
What areas of SAS are you most interested in?
what are the component of range? : Sas-bi
what is sas metadata server? : Sas-di
if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation
what is transformation in sas data integration? : Sas-di
What are pdv and it functions?
Of all your work, where have you been the most successful?