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 / aravind9882
u can use keep dataset option or keep statement to limit
the no of variables depending on ur requirement. if u want
process only those 5 variables, u can use keep dataset
option. if u want to limit d variables after d data is
processed u can use keep statement.
data new;
set old(keep=v1 v2 v3 v4 v5);
run;
or
data new;
set old;
keep v1 v2 v3 v4 v5;
run;
| Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
what is sas metadata server? : Sas-di
What are the features of SAS?
What are the new features included in the new version of SAS Programming Language?
please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??
Name validation tools used in SAS
In proc transpose and data step with arrays which one you pick?
what is sas application server, database server, sas olap server and sas metadata server? : Sas-di
Describe 5 ways to do a “table lookup” in SAS?
How many ways to overcome a missing values???
how does sas handle missing values in functions? : Sas programming
what is proc Index? and what is proc document?
Name and describe few sas character functions that are used for data cleaning in brief.
what is star schema? : Sas-di
What versions of SAS have you used (on which platforms)?
Explain the difference between using drop = data set option in set and data statement?