Specifying the Number of Digits after the Decimal Point

To define the number of digits after the decimal point for type P fields, you use the <decimals> parameter. The syntax is as follows:

Syntax

DATA <f> TYPE P DECIMALS <d>.....

The maximum number of digits <d> after the decimal point is 14 (see Numeric Data Types).

You can assign data objects to a packed number type variable, that have more decimal digits than the variable. If you have specified the program attribute Fixed point arithmetic (see Maintaining Program Attributes), the superfluous digits are rounded.

DATA WEIGHT TYPE P DECIMALS 2 VALUE '1.225'.

If the attribute Fixed point arithmetic is set, the value of WEIGHT is 1.23.