SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Search||next

Transforming Data with SAS Functions
Modifying Character Values with Functions
 


Question: Which DATA step correctly searches the variable Skills to create a new data set of professors who have counseling experience? Two sample values of the Skills variable are

  • student counseling,soccer coach
  • counseling,research director

data fall.counsel;
   set master.prof;
   if index(skills,'counseling') > 0;
run;
data fall.counsel;
   set master.prof;
   if index(skills,counseling) = 0;
run;



  ||next

 

Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement