In addition to @Astounding's comment on sum, if you intend to sum, or use in many functions, all elements of an array you can "of arrayname(*)".
data example;
input x1 x2 x3;
array z(*) x1-x3;
tot = sum(of z(*));
datalines;
1 2 3
;
I would suggest consideration of why you are using 0 to 19 and 1 to 20 both. Obviously we don't know what problem you are intending to work on and there may be good reasons but just looking at the code with several arrays of the same number of elements it can make things pretty confusing is you need to reference multiple array elements which is often done in parallel.
... View more