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
name several ways to achieve efficiency in your program? : Sas programming
Define run-group processing?
what is the difference between: x=a+b+c+d; and x=sum (of a, b, c ,d);? : Sas programming
What is the role of sas grid administrator? : sas-grid-administration
If money were no object, what would you like to do?
Hi, Does anybody has lastest SAS certification(base, adv., clinical)dumps,if anybody has please email me at mailtorajani76@gmail.com. Thanks
What is the function of Stop statement in a SAS Program?
what is sas and what are the functions? : Sas-administrator
What are the different servers in sas? : sas-grid-administration
What commands are used in the case of including or excluding any specific variables in the data set?
Have you ever used the SAS Debugger?
This entry was posted in General. Bookmark the permalink. Post a comment or leave
What are the five ways to do a table lookup in sas? : sas-grid-administration
what is the Population you used in your project, is it ITT or PP?
What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?