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
I am preparing SAS Certified Advanced Programmer for SAS 9 in 2014. If anybody has the latest dumps for this exam, please mail me at dhiman.mukherjee@gmail.com
What are the functions used for character handling?
How would you identify a macro variable? : sas-macro
Do you need to know if there are any missing values?
Of all your work, where have you been the most successful?
What are symget and symput? : sas-macro
How does the internal authentication work in sas? : sas-grid-administration
What is run-group processing?
What are the default statistics for means procedure?
How would you include common or reuse to be processed along with your statements?
how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5
which features do you use to check the data validations and errors? : Sas-administrator
Describe a time when you were really stuck on a problem and how you solved it?
what is hierarchy flattening? : Sas-di
what do the pad and dim functions do? : Sas programming