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 the difference between the proc sql and data step?
it will become easy if uuu provide website linkssss and list of consultanciessssss
what is change analysis in sas di ? : Sas-di
what is a method for assigning first.var and last.var to the by groupvariable on unsorted data? : Sas programming
what is sas data set?
List down the reasons for choosing sas over other data analytics tools.
how would you create multiple observations from a single observation? : Sas programming
what is the difference between infile and input? : Sas-administrator
Are you sensitive to code walk-throughs peer review or QC review?
what is the difference between floor and ceil functions in sas? : Sas-administrator
This entry was posted in General. Bookmark the permalink. Post a comment or leave
Explain the special input delimiters used in sas programming.
What are pdv and it functions?
How to create an external dataset with sas code?
Mention few capabilities of sas framework.