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?
Answers were Sorted based on User's Feedback
Answer / sindhura
new_data_set ( will have the five variables with variable
names var1, var2, var3, var4, var5)
data new_data_set;
set old_data_set( keep = var1 var2 var3 var4 var5);
run;
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / mohan reddy
U CAN USE THE KEEP OPTION.
EX
DATA EMP(KEEP=NAME AGE SAL ADD LOC);
SET EMPLOYEE;
RUN;
| Is This Answer Correct ? | 3 Yes | 4 No |
Answer / sandeep reddy
I think we have to use OBS=5
and mention FIRSTOBS=(THE FIRST OBSERVATION FROM WHERE U
WANT)
| Is This Answer Correct ? | 1 Yes | 19 No |
what do the sas log messages "numeric values have been converted to character" mean? : Sas programming
How would you determine how far down on a page you have printed in order to print out footnotes?
What are the special input delimiters used in SAS?
Under what circumstances would you code a SELECT construct instead of IF statements?
If you use a symput in a data step, when and where can you use the macro variable? : sas-macro
what is sas olap server? : Sas-di
what is operational data and operational system? : Sas-di
Can you use a macro within another macro? If so how would SAS know where the current acro ended and the new one began?
how can you sort the dataset having millions of OBS(instead of sort procedure?
In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single variable)
8 Answers GSK GlaxoSmithKline,
is there any differnce between proc means and proc summary?
for report generation which one you used proc report or data_null_?
3 Answers Accenture, Quintiles,