*---------*---------------*-----------------*----------------*---------------* | CODE | FACTOR 1 | FACTOR 2 | RESULT | INDICATORS | | | | | FIELD | | *---------*---------------*-----------------*----------------*---------------* | XFOOT | | Array name | Sum | + - Z | | (1/2) | | | | | *---------*---------------*-----------------*----------------*---------------*
XFOOT adds the elements of an array together and places the sum into the field specified as the result field. Factor 2 contains the name of the array.
If half-adjust (position 53) is specified, the rounding occurs after all elements are summed and before the results are moved into the result field. If the result field is an element of the array specified in factor 2, the value of the element before the XFOOT operation is used to calculate the total of the array.
For further rules for the XFOOT operation, see Arithmetic Operations.
See Figure "Summary of Arithmetic Operations" for an example of the XFOOT operation.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.