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.
.-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 assigment would be reduced to one operation, but the padding byte will be zeroed out.