Das genaueste Ergebnis erhält man mit Eval(R). Die Erweiterung (M) ist der Standard!

Wenn man das Ganze global (für alle Rechenoperationen) innerhalb der Quelle setzen möchte, kann man auch einfach das Schlüssel-Wort EXPROPTS(*RESDECPOS) in den H-Bestimmungen angeben.

Auszug aus der RPG-Reference:
The EXPROPTS (expression options) keyword specifies the type of precision rules to be used for an entire program. If not specified or specified with *MAXDIGITS, the default precision rules apply. If EXPROPTS is specified, with *RESDECPOS, the "Result Decimal Position" precision rules apply and force intermediate results in expressions to have no fewer decimal positions than the result.

Note: Operation code extenders R and M are the same as EXPROPTS(*RESDECPOS) and EXPROPTS(*MAXDIGITS) respectively, but for single free-form expressions

Birgitta