MIN

The MIN function returns the content of the argument that contains the minimum value.

The function type depends on the argument type, as follows:

Argument type Function type
Alphabetic Alphanumeric
Alphanumeric Alphanumeric
National National
All arguments integer
(includes integer arguments of usage NATIONAL)
Integer
Numeric (some arguments can be integer)
(includes numeric arguments of usage NATIONAL)
Numeric

Format

Read syntax diagramSkip visual syntax diagramFUNCTION MIN( argument-1 )
argument-1
Must be class alphabetic, alphanumeric, national, or numeric.

All arguments must be of the same class, except that a combination of alphabetic and alphanumeric arguments is allowed.

The returned value is the content of argument-1 having the least value. The comparisons used to determine the least value are made according to the rules for simple conditions. For more information, see Conditional expressions.

If more than one argument-1 has the same least value, the leftmost argument-1 having that value is returned.

If the type of the function is alphanumeric or national, the size of the returned value is the size of the selected argument-1.