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

Arithmetic built-ins with scale factors and FIXED BIN

Under the RULES(IBM) compile-time option, which is the default, variables can be declared as FIXED BIN with a nonzero scale factor. Infix, prefix, and comparison operations are performed on scaled FIXED BIN using the same semantics as the old compilers.

However, the ADD, DIVIDE, or MULTIPLY built-in functions will not produce FIXED BIN results with nonzero scale factors.

The new compiler evaluates these built-in function as FIXED DEC rather than as FIXED BIN as the old compilers did if either of the following is true:

For example, the new compiler would evaluate the DIVIDE built-in function in the assignment statement below as a FIXED DEC expression:

       dcl (i,j) fixed bin(15);
       dcl x     fixed bin(15,2);

       ...

       x = divide(i,j,15,2);

Note that in most cases where this message appears, no change is necessary; this is usually what the programmer thought was happening. For example, in the above code, it would be the rare program that actually wanted the result of that divide to have the attributes FIXED BIN(15,2) rather than FIXED DEC(15,2).

The compiler will flag this difference with message IBM1053.


Terms of use | Feedback

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