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

REDUCE

The REDUCE option specifies that the compiler is permitted to reduce an assignment of a null string to a structure into simpler operations - even if that means padding bytes might be overwritten.

The REDUCE option also allows the compiler to reduce the assignment of matching structures into a simple aggregate move - even if the structures contain POINTER fields.

Read syntax diagramSkip visual syntax diagram   .-REDUCE---.
>>-+-NOREDUCE-+------------------------------------------------><
 

The NOREDUCE option specifies that the compiler must decompose an assignment of a null string to a structure into a series of assignments of the null string to the base members of the structure.

The REDUCE option will cause fewer lines of code to be generated for an assignment of a null string to a structure, and that will usually mean your compilation will be quicker and your code will run much faster. However, padding bytes may be zeroed out.

For instance, in the following structure, there is one byte of padding between field12 and field13.

  dcl
   1 sample ext,
     5  field10          bin fixed(31),
     5  field11          bin fixed(15),
     5  field12          bit(8),
     5  field13          bin fixed(31);

Now consider the assignment sample = ’’;

Under the NOREDUCE option, it will cause four assignments to be generated, and the padding byte will be unchanged.

However, under REDUCE, the assignment would be reduced to one operation, but the padding byte will be zeroed out.

The NOREDUCE option makes the compiler act more like the OS PL/I and the PL/I for MVS compilers. These compilers would reduce an assignment of matching structures into a simple aggregate move unless the structures contain POINTER fields. The NOREDUCE option will make this compiler act the same way.


Terms of use | Feedback

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