SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Generating Data with DO Loops
Constructing DO Loops


Question:
The DATA step below reads Hrd.Absent to determine which departments have more than four absences in one day. Write an iterative DO statement to increment the index variable day by the values of the data set variables Mon, Tue, Wed, Thr, and Fri.
  data hrd.excess;
     set hrd.absent;
    
        if day>4 then 
           Note='Investigate';
     end;
  run;
Description of Hrd.Absent
Variable Type Length
Department char 16
Mon num 8
Tue num 8
Wed num 8
Thr num 8
Fri num 8


           


  back||next

 

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

Terms of Use & Legal Information | Privacy Statement