Previous Topic: EXCUSRSRC Function Example

Next Topic: Examples

MAX Function Field

MAX (maximum) is a special type of field usage that is assigned to function fields containing the result of a computation of the highest value for a particular field.

The MAX field usage uses a special built-in routine that computes the value of the function field based on the input parameter. For instance, within an Edit Transactions function type, you could define a MAX function field on the header record file to calculate the highest value of orders that appear in the detail file. You must define the input and result parameters associated with the MAX function field. The MAX function field would calculate the resultant value on initialization and call to the function.

MAX function fields have two, and only two, parameters:

Function fields of usage MAX must always be numeric. If the function field is defined as a referenced (REF) field based on another numeric field, CA 2E assumes that the based-on field is the field whose maximum value is calculated.