SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Creating Variables
Executing Multiple Statements Conditionally


Question: Which DO group correctly creates the variable Late to accumulate total days late on payments?
data loans.overdue;
   set finance.loans;
   if datedue>60 then
      do;
         Late+janlate;
         note='Late';
         else note='OK';
      end;
run;
data loans.overdue;
   set finance.loans;
   if datedue>60 then
      do;
         Late+janlate;
         note='Late';
      end;
   else note='OK';
run;
data loans.overdue;
   set finance.loans;
   if datedue>60 then
      do;
         JanLate+late;
         note='Late';
      end;
   else note='OK';
run;


  back||next

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

Terms of Use & Legal Information | Privacy Statement