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

What are the ways in which macro variables can be created in sas programming?

656


How would you identify a macro variable?

741


Describe a time when you were really stuck on a problem and how you solved it?

2287


what is the use of sas management console? : Sas-di

688


What is proc sort?

809






hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

1752


explain what is factor analysis? : Sas-administrator

688


how would you create multiple observations from a single observation? : Sas programming

676


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

871


Mention sas system options to debug sas macros.

758


What is the difference between one to one merge and match merge? Give an example.

672


explain what is data set in sas? : Sas-administrator

626


Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro

809


What are the five ways to do a table lookup in sas? : sas-grid-administration

690


what is factor analysis? : Sas-administrator

722