Keyword DECPREC is used to specify the decimal precision of decimal (packed,
zoned, or binary) intermediate values in arithmetic operations in expressions.
Decimal intermediate values are always maintained in the proper precision, but this keyword affects how decimal expressions are presented
when used in %EDITC, %EDITW, %CHAR, %LEN, and %DECPOS.
DECPREC(30)
The default decimal precision. It indicates that the maximum
precision of decimal values when used in the affected operations is 30 digits.
However, if at least one operand in the expression is a decimal variable with
31 digits, DECPREC(31) is assumed for that expression. If at least one operand
in the expression is a decimal variable with 32 or more digits, DECPREC(63)
is assumed for that expression.
DECPREC(31)
The maximum precision of decimal values when used in the
affected operations is 31 digits. However, if at least one operand in the
expression is a decimal variable with 32 digits or more, DECPREC(63) is assumed
for that expression.
DECPREC(63)
The number of digits used in the affected operations is always computed
following the normal rules for decimal precision, which can be up to the maximum
of 63 digits.