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

One-byte FIXED BIN

If you have any variables declared as FIXED BIN with a precision of 7 or less, they occupy one byte of storage under Enterprise PL/I instead of two as under PL/I for MVS & VM and earlier. 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, fewer bytes would be read in under Enterprise PL/I than under PL/I for MVS & VM or earlier PL/I release.

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

To help you locate where you might have problems because of this difference, the compiler will flag any FIXED BIN with precision <= 7 with message IBM1044.

The (NO)BIN1ARG suboption of the DEFAULT compiler option controls how the compiler handles one-byte REAL FIXED BIN arguments passed to an unprototyped function:

Consider the following example:

dcl f1 ext entry;
dcl f2 ext entry( fixed bin(15) );

call f1( 1b );
call f2( 1b );

If you specified DEFAULT(BIN1ARG), the compiler would pass the address of a one-byte FIXED BIN(1) argument to the routine f1 and the address of a two-byte FIXED BIN(15) argument to the routine f2. However, if you specified DEFAULT(NOBIN1ARG), the compiler would pass the address of a two-byte FIXED BIN(15) argument to both routines.

Note that if the routine f1 was a COBOL routine, passing a one-byte integer argument to it would cause problems since COBOL has no support for one-byte integers. In this case, using DEFAULT(NOBIN1ARG) might be helpful; but it would be better to specify the argument attributes in the entry declare.

So, while BIN1ARG is the default suboption, you may find it useful to specify the NOBIN1ARG suboption for increased compatibility.


Terms of use | Feedback

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