SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Variables
Assigning Values Conditionally


Question:
Which statement below correctly assigns the value SE to the new variable Region if the variable City has the value Atlanta? (The data set that stores the variables is shown, in part, below.)

SAS Data Set US.Sales
City ProductNumber
Tampa K445
Atlanta K702
Boston F065

if city='Atlanta' then Region='se';
if region='SE' then City='Atlanta';
if city='Atlanta' then Region='SE';
if region='Atlanta' then City='SE';


  back||next

 

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

Terms of Use & Legal Information | Privacy Statement