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 / pratik

data datasetname;(where you want create new dataset)
set datasetname1;(in which you have 100000 records)
if _N_(100,500,1020,1890,2565);
run;
proc print data=datasetname;
run;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

563


how to change the execute of macro

1669


how would you create a data set with 1 observation and 30 variables from a data set with 30 observations and 1 variable? : Sas programming

834


what are the new features included in the new version of sas i.e., Sas 9.1.3? : Sas programming

543


Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??

2088






What do the put and input function do?

583


What is the function of output statement in a SAS Program?

606


Explain data step in SAS

627


Explain input and put function?

643


how does sas handle missing values in assignment statements? : Sas programming

565


How to include or exclude specific variables in a data set?

641


What are the automatic variables for macro? : sas-macro

670


hi here is a problem can anybody solve this? i want to report the data through third party file. by using data _null_ or proc report or macro automation process. but i want to insert the 'titles and footnotes' in between the data and also starting of 2nd and ending of 2nd and starting of 3rd and ending of the 3rd page. tell me how and write the code?

1684


how will you location sas platform applications available from web browser? : Sas-bi

540


What are the data types in sas?

604