SET TOT
The SET TOT statement is used to obtain the value of an end-of-range total that was accumulated automatically or using the TOTAL statement. SET TOT retrieves the total value and places it in the destination field. The value is dependant on the current sort level. Refer to the TOTAL statement for additional information.
••••• SET TOT ••• ••••••••••••••••••••••
••• = ••• •••••••••••••••••••••• •••
(1)
(2) (3) (4) (5) (6) (7)
(7) Source occurrence (constant/index) | |
(4) Destination occ (constant/index) |
|
SET TOT is used in End-of-Range frames in output and update processes.
The source and destination fields can be the same. In this case, the total for that field is moved from the total area into the current area for that field.
Both the source and destination fields must be numeric.
If the destination field is not large enough to hold the integer portion of the totaled field, a non-recoverable error occurs, unless overflow processing is present in the event point.
In the following example, the value in the WORK CASH RECEIVED work field is placed in the WORK AMOUNT work field.
SET TOT TAR WORK AMOUNT = TAR WORK CASH RECEIVED