If ALL you want to do is summarize A1-A8 on every row, then you do not need to use an ARRAY:
[pre]
data a;
input (a1-a8) (1.);
num = sum(of a1-a8);
return;
datalines;
11111111
10101010
11100110
10101101
10110111
00010110
00010100
01011101
;
run;
proc print data=a;
sum a1-a8 num;
run;
[/pre]
In the above program, the SUM function is used to summarize A1-A8 on every observation/row and then in the PROC PRINT step, a summary line is displayed which summarizes (in a grand total) the values for A1-A8 and NUM.
Since your variables follow a regular numbered pattern, you can use the OF syntax in the SUM function. If you had differently named variables, then your SUM function would need to be invoked differently:
[pre]
newvar = sum(a1, wombat, b4, x, koala, somevar, other);
[/pre]
cynthia