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?

Answers were Sorted based on User's Feedback



i have a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we ..

Answer / solasa

we can use PROC SURVEY SELECT

Is This Answer Correct ?    8 Yes 2 No

i have a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we ..

Answer / dilip

data A;
do slice = 100,500,1890,256,...100th;
set source point=slice;
output;
end;
stop;
run;

Is This Answer Correct ?    6 Yes 0 No

i have a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we ..

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

i have a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we ..

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

i have a dataset with 100000 records. i want 100 records from that dataset and create a dataset.we ..

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

More SAS Interview Questions

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?

0 Answers   Cognizant,


What is the basic syntax style in SAS?

0 Answers  


what is the basic structure sas administrator? : Sas-administrator

0 Answers  


What does proc print, and proc contents are used for?

0 Answers  


What is the difference between an informat and a format. Name three informats or formats.

6 Answers  


Differences between where and if statement?

0 Answers  


Can you explain the process of calendar?

0 Answers  


Differentiate input and infile.

0 Answers  


How would you determine how far down on a page you have printed in order to print out footnotes?

3 Answers  


Mention few ways with which a “table lookup’ is done in sas programming.

1 Answers  


if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...

0 Answers   Accenture,


Given an unsorted data set, how to read the last observation to a new data set?

0 Answers  


Categories