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
explain about data integrator metadata reports? : Sas-di
What is the difference between INPUT and INFILE ?
How is character variable converted into numeric variable and vice versa?
Approximately what date is represented by the SAS date value of 730?
Give some examples where proc report’s defaults are different than proc print’s defaults?
Hi, If anyone has base SAS certification dumps, please share.
explain what is factor analysis? : Sas-administrator
What are the difference between ceil and floor functions in sas?
Give e an example of..
What would be the value of month at the end of data step execution and how many observations would be there?
explain the function of substr in sas? : Sas-administrator
Mention what is the difference between nodupkey and nodup options?
What is the function of Stop statement in a SAS Program?
What is Linear Regression?
What is program data vector (pdv) and what are its functions?