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


Please Help Members By Posting Answers For Below Questions

what is sas database server? : Sas-di

617


List down the reasons for choosing sas over other data analytics tools.

806


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

1663


Describe the ways in which you can create a macro variable?

624


Explain what is the use of proc gplot?

702






Explain by-group processing?

587


what is the Population you used in your project, is it ITT or PP?

2183


Describe 5 ways to do a “table lookup” in SAS?

701


How many data types are there in SAS?

634


Name and describe few sas character functions that are used for data cleaning in brief.

668


What do the sas log messages “numeric values have been converted to character” mean? What are the implications?

719


What are the data types does SAS contain?

655


What are the uses of sas?

707


Mention what is the difference between nodupkey and nodup options?

595


which date functions advances a date time or date/time value by a given interval? : Sas programming

537