ARRAYs and DO OVER loops are a way of programming more efficiently. Using them can save
writing many lines of code, can reduce the risk of error, and can make error detection and correction easier.
from http://staff.washington.edu/glynn/array.pdf
* array1.sas ;
title1 'array1.sas' ;
options compress = yes nodate ;
data one;
input v1 - v3 ;
cards ;
.2 .3 .4
.5 .6 .321
.21 .3 .4
.15 .36 .13
;
run;
data two;
set one ;
a1 = v1 * 100 ;
a2 = v2 * 100 ;
a3 = v3 * 100 ;
array orig v1 - v3 ;
array perc p1 - p3 ;
do over orig ;
perc = orig * 100 ;
end;
run;
proc print ;
run ;