How do you read in the variables that you need?

Answer Posted / chiranjeevi

using variable control options.
keep:It decides the no. of variable should remain within the
dataset.

syntax:keep<variablelist>;
example:
data code;
input name$ no sal;
keep name sal;
datalines;
a 32 3000
b 56 7000
c 12 7890
run;
proc print data=code;
run;

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you react when, while consulting a SAS documentation manual to get an answer to a problem, someone says hey, I thought you were supposed to know all that stuff already, and not have to look it up in a book?

1945


Which function is used to count the number of intervals between two sas dates?

570


what do the sas log messages "numeric values have been converted to character" mean? What are the implications? : Sas programming

693


what are sas bi dashboard components? : Sas-bi

664


what is the difference between floor and ceil functions in sas? : Sas-administrator

707






How do you specify the number of iterations and specific condition within a single do loop?

624


What are the best sas programming practices for handling very large datasets? : sas-grid-administration

570


Why double trailing @@ is used in input statement?

703


Difference between sum function and using “+” operator?

603


If a variable contains only numbers, can it be a character data type?

613


Differentiate input and infile.

596


Will it bother you if the guy at the next desk times the frequency and duration of your bathroom or coffee breaks on the grounds that ?you are getting paid twice as much as he is??

2097


Explain what is data step?

731


What do you code to create a macro? : sas-macro

582


Mention the difference between ceil and floor functions in sas?

649