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
Give some examples where proc report’s defaults are same as proc print’s defaults?
what do the mod and int function do? What do the pad and dim functions do? : Sas programming
Differentiate between ceil and floor functions.
Are you involved in writing the inferential analysis plan? Tables specifications?
Describe the function and untility of the most difficult SAS macro that you have written.
what can you learn from the sas log when debugging? : Sas programming
Differences between where and if statement?
What are the prime responsibilities of data integration administrator? : Sas-di
what is sas metadata server? : Sas-di
Difference between informat and format?
how does sas handle missing values in formats? : Sas programming
what do you mean by data staging area? : Sas-di
If you were told to create many records from one record, show how you would do this using array and with proc transpose?
How would you define the end of a macro? : sas-macro
name several ways to achieve efficiency in your program? : Sas programming