SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Variables
Executing Multiple Statements Conditionally


Question: The IF-THEN statements below can be rewritten to execute as a DO group. Which of the choices below will not accomplish that correctly?

if City='Madrid' then Museum=3;
if City='Madrid' then Other=2;
if City='Madrid' then
   do;
     Museum=3;
     Other=2;
   end;

if City='Madrid' then do;
     Other=2;
     Museum=3;
   end;

if City='Madrid' then
   Museum=3;
   Other=2;
run;


  back||next

 

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

Terms of Use & Legal Information | Privacy Statement