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 to create a permanent sas data set?

864


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??

2344


What do the PUT and INPUT functions do?

1000


What would be the value of month at the end of data step execution and how many observations would be there?

794


What are the differences between sum function and using “+” operator?

790


How can sas program be validated?

774


What is the difference between match merge and one to one merge?

918


Have you ever used the SAS Debugger?

1466


What is the function of Stop statement in a SAS Program?

888


What does proc print, and proc contents are used for?

814


What is a method for assigning first.VAR and last.VAR to the BY group variable on unsorted data?

2292


Mention the validation tools used in SAS?

847


Compare sas with other data analytics tools.

793


how we can create a FLAG datasets? Ex:-ID age_group no_persons 1 to 10 10 to 20 3 11 to 20 21 to 30 7 21 to 3o 31 to 40 5

1874


for whom is sas data integration studio designed? : Sas-di

735