SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Processing Variables with Arrays
Expanding Your Use of Arrays


Question: Complete the DATA step below by adding an ARRAY statement to create five new character variables named New1-New5 with a length of 16.

  data work.newcrs;
     set hrd.courses;
     array g{5} group1-group5;
       
     do i=1 to 5;
        new(i)=g(i)||'/new';
     end;
  run;
Description of Hrd.Courses
Variable Type Length
Group1 char 12
Group2 char 12
Group3 char 12
Group4 char 12
Group5 char 12


           

  back||next


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

Terms of Use & Legal Information | Privacy Statement