Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide

Language elements causing runtime differences

The PL/I compiler implements some language elements differently on Windows and z/OS. These differences in implementation might cause differences in the way your program runs. Each of the following items is described in terms of its behavior on Windows.

FIXED BIN(p) maps to 1 byte if p <= 7
If you have any variables declared as FIXED BIN with a precision of 7 or less, they occupy 1 byte of storage under PL/I for Windows instead of two as under PL/I for z/OS. If the variable is part of a structure, this usually changes how the structure is mapped, and that could affect how your program runs. For example, if the structure were read in from a file created on the mainframe, fewer bytes would be read in.

To avoid this difference, you could change the precision of the variable to a value between 8 and 15 (inclusive).

INITIAL attribute for AREAs is ignored
To keep PL/I for Windows from ignoring the INITIAL attribute for AREAs, convert INITIAL clauses into assignment statements.

For example, in the following code fragment, the elements of the array are not initialized to a1, a2, a3, and a4.

  dcl (a1,a2,a3,a4) area;
  dcl a(4) area init( a1, a2, a3, a4 );

However, you can rewrite the code as follows so that the array is initialized as wanted.

  dcl (a1,a2,a3,a4) area;
  dcl a(4) area;

  a(1) = a1;
  a(2) = a2;
  a(3) = a3;
  a(4) = a4;
Issuing of ERROR messages
When the ERROR condition is raised, no ERROR message is issued under PL/I for Windows if the following two conditions are met: ERROR messages are directed to STDERR rather than to the SYSPRINT data set. By default, this is the terminal. If SYSPRINT is directed to the terminal, any output in the SYSPRINT buffer (not yet written to SYSPRINT) is written before any ERROR message is written.
ADD, DIVIDE, and MULTIPLY do not return scaled 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 as with the mainframe. However, when the ADD, DIVIDE, or MULTIPLY built-in functions have arguments with nonzero factors or specify a result with a nonzero scale factor, the PL/I for Windows compilers evaluate the built-in function as FIXED DEC rather as FIXED BIN as the mainframe compiler.

For example, the PL/I for Windows compilers 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)
Enablement of OVERFLOW and ZERODIVIDE
For OVERFLOW and ZERODIVIDE, the ERROR condition is raised under the following conditions:
Rational Developer for System z
PL/I for Windows, Version 8.0, Programming Guide