(LMAX(list))
Returns the maximum value in list. Values in a list can be a CURRENCY, DOUBLE, REAL, INTEGER, NUMERIC, DATE, or TIME data type. The function LMAX is not the same as the function MAX, which is used only with the SELECT command.
In the following example, the value of vlmax is 80, the highest number in the list.
SET VAR vlmax = (LMAX(2,80,14,22))