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
I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys just because of the change in it's Sales Group. SKey SalesGroup Sales Office BeginDate EndDate 280 SG1 SO1 01APR2000 01APR2010 281 SG2 SO1 02APR2010 31MAR2999 Now while loading the Fact, the Lookup ir returning SKey 280 for records before and after 01APR2010. I am not able to give WHERE condition in the Lookup Properties (TranDate between BeginDate and EndDate). Please help.
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable? : sas-macro
How to sort in descending order?
Mention some common errors that are usually committed in sas programming.
Approximately what date is represented by the SAS date value of 730?
Are you involved in writing the inferential analysis plan? Tables specifications?
What is the difference between %put and symbolgen? : sas-macro
what is the basic structure sas administrator? : Sas-administrator
What are the new features included in the new version of SAS Programming Language?
what are validation tools that are used in sas? : Sas-administrator
: and & modifiers.
What is connection profile? : sas-grid-administration
what is SAS OPTIMIZATION?
What are the five ways to do a table lookup in sas? : sas-grid-administration
What areas of SAS are you most interested in?