7 65 1 KEEP_MIN Parameters

LANSA Technical

7.65.1 KEEP_MIN Parameters

BY_FIELD

IN_FIELD

OF_FIELD

OF_FIELD

Specifies from 1 to 50 fields that are to be scanned for the minimum value by the KEEP_MIN 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 value of the field having the minimum value 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 scanned for the minimum value.

*SELECTED, which is the default value indicates, that the scanning for minimum value 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 scanning for minimum value 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 scan for minimum value cycle is started.

The "accumulator" is the work field keeping track of the minimum value.