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 does the trace option do?
: and & modifiers.
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
is data integration and etl programming is same? : Sas-di
What is the good sas programming practices for processing large data sets?
Differentiate between sas functions and sas procedures.
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.
What is by-group processing?
What is the maximum length of the macro variable?
I have a dataset concat having a variable a b & c. How to rename a b to e & f?
What are SAS/ACCESS and SAS/CONNECT?
Can you explain the process of calendar?
how sas deals with business intelligence? : Sas-bi
what are the types of interactive display types? : Sas-bi
What system options would you use to help debug a macro? : sas-macro