%Max() returns the maximum value of its operands:

%Min() returns the minimum value of its operands.

Example :

Dcl-s Price1 Packed(7 : 2);

Dcl-s Price2 Packed(7 : 2);

Dcl-s Price3 Packed(7 : 2);

Dcl-s Costliest Packed(7 : 2);

Dcl-s Cheapest Packed(7 : 2);

Costliest = %Max(Price1 : Price2 : Price3);

Cheapest = %Min(Price1 : Price2 : Price3);