Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Hi Guys,
I slightly modified Dilip's answer.
I took Sashelp.shoes as the input dataset.
Following is the solution.
data A;
do i=1 to 100;
k=int(51*ranuni(2)+1);
do slice = K;
set sashelp.shoes point=slice;
output;
end;
end;
stop;
drop i k;
run;

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is program data vector (pdv) and what are its functions?

1148


What is the difference between one to one merge and match merge? Give an example.

995


How would you define the end of a macro?

1039


what are the categories that sas informats are used to the place the data? : Sas-administrator

988


What is maximum number of rows and cols can be handled in SAS?

1471


What is program data vector (pdv)?

1186


What is the work of tranwrd function?

1178


what are the best practices to process the large data sets in sas programming? : Sas-administrator

958


What is the difference between %put and symbolgen? : sas-macro

1158


do you need to know if there are any missing values? : Sas programming

987


Describe the function and utility of the most difficult SAS macro that you have written?

2478


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

1296


What are the ways in which macro variables can be created in sas programming?

1028


How to create list output for cross-tabulations in proc freq?

1060


What is proc sort?

1133