If you have a data set that contains 100 variables, but you
need only five of those, what is the code to force SAS to
use only those variable?
Answer Posted / ram pabba
It is true to use KEEP option on a dataset to only select
few variables from 100 variables.
We can use KEEP option either on set statement or data
step statement. If we use on SET statement then only the
five variables are created on pdv and only these variables
are sent to the output dataset. If we use KEEP option on
data step statement then all the variables are copied into
pdv and after any maniuplation only the selected variables
on data step statement are processed and sent to output
dataset.
data abc;
set xyz (keep= ab cd ef gh);
run;
data abc(keep= ab cd ef gh ij);
set xyz;
ij=ab+jk;
run;
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
what is sas enterprise intelligence architecture? : Sas-bi
What are the five ways to do a table lookup in sas? : sas-grid-administration
What are the different servers in sas? : sas-grid-administration
What is maximum number of rows and cols can be handled in SAS?
what are input dataset and output dataset options? : Sas programming
Tell e how how dealt with..
Give some examples where proc report’s defaults are same as proc print’s defaults?
What is the role of unrestrictive users? : sas-grid-administration
where are dashboard components are created and maintained? : Sas-bi
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.
hi all, I need the SAS DI DUMP(A00 260) for attending the certification. if any one have, pls provide it.Please Email to vrpotluri@hotmail.com. Thanks - Ramana
Describe what are the different levels of administrative users in sas? : sas-grid-administration
Define run-group processing?
Give some examples where proc report’s defaults are different than proc print’s defaults?
what is proc Index? and what is proc document?