7 66 1 KEEP_TOTAL Parameters

LANSA Technical

7.66.1 KEEP_TOTAL Parameters

BY_FIELD

IN_FIELD

OF_FIELD

OF_FIELD

Specifies from 1 to 50 fields that are to be totaled by the KEEP_TOTAL command.

Fields specified in this parameter must be defined in the LANSA data dictionary or defined within this function by a DEFINE command. Expandable group expressions are valid in this parameter.

The fields specified must also be numeric.

IN_FIELD

Specifies the field that is to hold the result of the totaling of the field(s) specified in the OF_FIELD parameter.

The field specified in this parameter must be numeric and must be defined in the LANSA data dictionary or defined in this function with a DEFINE command.

This field is reset at the beginning of each SELECT/SELECTLIST loop.

BY_FIELD

Specifies the condition under which the fields are to be totaled.

*SELECTED, which is the default value indicates, that the totaling should continue until the SELECT/SELECTLIST loop terminates (ie: all selected information).

Otherwise, specify a list of 1 to 20 field names (alternatively, enter an expandable group expression). The totaling continues until one or more of the fields in the list changes value. When one or more of the fields changes value the "accumulator" is reset to its null value and a new totaling cycle is started.

The "accumulator" is the work field calculating the total.

See the examples section for more details of how this parameter is used.