SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Processing Variables with Arrays
Creating One-Dimensional Arrays


Graphical Display of Array Processing

As the DATA step continues its DO loop iterations, the index variable i is changed from 1 to 2, 3, 4, 5, and 6, causing Weight1 through Weight6 to receive new values in the program data vector. Watch the building of the program data vector as you step through the process below.

     data hrd.convert;
        set hrd.fitclass;
        array wt(6) weight1-weight6;
        do i=1 to 6;
           wt(i)=wt(i)*2.2046;
        end;
     run;

Select buttons below to view a series of animated graphics of the DO loop processing array elements.




back||next


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

Terms of Use & Legal Information | Privacy Statement