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 are sas/access and sas/connect? : Sas programming

991


Differentiate between format and informat? : sas-grid-administration

1058


I have a dataset concat having variable a b & c. How to rename a b to e & f?

1014


What areas of SAS are you most interested in?

1533


What is the use of the %include statement?

1153


What is the difference between reading data from an external file and reading data from an existing data set?

1171


What are the statements in proc sql?

1100


What commands are used in the case of including or excluding any specific variables in the data set?

1092


explain the use of % includes a statement in sas? : Sas-administrator

1000


What is factor analysis?

1130


What would you change about your job?

2386


How will you generate test data with no input data?

1170


what is sas business intelligence? : Sas-bi

1173


Mention sas system options to debug sas macros.

1168


i have a dataset with 100 obs i want to generate title from 20th obs onwards with total observations. that should contain 100 obs.dont use firstobs and dnt split the data. use dataset block or proc report? how can we genarate;

2492