Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Migration Guide

IBM2801: introduction of scaled FIXED BIN

This message alerts you to a possible misunderstanding of PL/I rules and, consequently, a possible source of problems:

  IBM2801I I  FIXED DEC(p1,q1) operand will be converted to FIXED BIN(p2,q2).
              This introduces a non-zero scale factor into an integer operation
              and will produce a result with the attributes FIXED BIN(r,s).

This message applies to arithmetic operations where one operand is scaled FIXED DEC and one is unscaled FIXED BIN. By PL/I rules, under the RULES(IBM) compiler option, if one operand in an arithmetic operation is DECIMAL and one is BINARY, then the result is BINARY. This applies even if the DECIMAL operand is FIXED DEC with a non-zero scale factor and the BINARY operand is FIXED BIN with a scale factor of zero.

For example, if X is FIXED DEC(5,1) and Y is FIXED BIN(15), then in evaluating the expression X+Y, X will be converted to FIXED BIN(18,4), and the result will have the attributes FIXED BIN(20,4). The compiler will also issue the W-level message IBM1099I because a FIXED DEC(5,1) value whose fractional is not .0 or .5 can not be exactly represented in FIXED BIN.

If you want to eliminate this message and avoid the problems it hints at, you may apply the DECIMAL built-in function to the FIXED BIN operand. For example, X+DEC(Y) would produce a result with the attributes FIXED DEC(8,1).


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)