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
name some data transformation used in sas di? : Sas-di
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
Explain the difference between nodup and nodupkey options?
How do you debug and test your SAS programs?
What is the difference between proportion and average?
Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?
What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?
What are the features of SAS?
what are some problems you might encounter in processing missing values? In data steps? Arithmetic? Comparisons? Functions? Classifying data? : Sas programming
what can you learn from the sas log when debugging? : Sas programming
What does PROC print, and PROC contents do?
Have you ever used the SAS Debugger?
Can you explain the process of calendar?
what is the difference between unique key and primary key? : Sas-di
explain about various caches available in data integrator? : Sas-di