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?



If you have a dataset that contains 100 variables, but you need only five of those, what is the code..

Answer / Devendra Kumar Sharma

To use specific variables from a dataset in SAS, you can specify them in the DATA step using the KEEP= option or the DROP= option. Example using KEEP=: n data new_data; set old_data(keep=var1 var2 var3 var4 var5);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SAS Interview Questions

For what purpose(s) would use the RETURN statement?

1 Answers  


What are the functions which are used for character handling functions?

1 Answers  


I have a dataset with variables empid and doj how to calculate retirement age?

1 Answers  


what is change analysis in sas di ? : Sas-di

1 Answers  


What would you change about your job?

1 Answers   Oracle,


How do you add a number to a macro variable?

2 Answers  


what has been your most common programming mistake? : Sas programming

1 Answers  


Can you excute a macro within a macro? Describe.

3 Answers  


What's the difference between VAR A1 - A4 and VAR A1 - A4?

1 Answers   Quintiles,


Explain append procedure?

1 Answers  


What is the pound sign used for in the data_null_ ?

1 Answers  


Explain what is the use of proc gplot?

1 Answers  


Categories