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 / soniya
in data set - use keep
in proc step- use var ,id statements
ex-
data a;
infile urfilename;
input score1-score100;
keep sore1-score5;
run;
input a;
input score1-scor100
run;
proc print data=a;
var score1-score5;
id score1-score5;
run;
observe id-in this statement nuber of obs not displed in
out put
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is PhaseIII, ODS, TLG, Macro and Proc in SAS
what do you mean by data staging area? : Sas-di
What is connection profile? : sas-grid-administration
what is the one statement to set the criteria of data that can be coded in any step? : Sas programming
How do dates work in sas?
What are the new features included in the new version of SAS Programming Language?
explain the proc in sas? : Sas-administrator
What is the sas data set? : sas-grid-administration
What are common programming errors committed in sas
Mention common programming errors committed in sas ?
what is the use of proc contents and proc print in sas? : Sas-administrator
If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?
Do you need to compute new variables? If so,should you do this before you execute the report-writing procedure?
What is the difference between INPUT and INFILE ?
What is the difference between proportion and average?