Hello,

I have variables order like below:

a1 a2 a3 a4 b1 b2 b3 b4 c1 c2 c3 c4 ................. z1 z2 z3 z4

I have to sum up variables like below:

compute p5_a=sum(a1 to a4).

compute p5_b=sum(b1 to b4).

.

.

compute p5_z=sum(z1 to z4).

This kind of syntax is very long. I thought to use do repeat but it woul be also quite long like below:

do repeat

a=p5_a to p5_z

/b=a1 b1........................z1

/c=a2 b2........................z2

/d=a3 b3........................z3

/e=a4 b4........................z4.

compute a=sum(b,c,d,e).

end repeat.

Unfortunetly I am not able to write for example /b=a1 to z1 because variables are not contigous. Could someone has idea how to shorten this syntax? Unfortunetly, I do not have any idea (maybe reorder these variables like a1 b1 c1......z1 a2 b2......z2 a3...............etc. but how can I do it quite fast without very long syntax, or maybe use loop???? )

Thank you for help in advance.