Required changes to fprintf and fscanf strings %D, %DD, and %H

As of z/OS® V1R8, XL C/C++ supports decimal floating point size modifiers ("D", "DD", and "H") for the fprintf and fscanf families of functions. If a percent sign (%) is followed by one of these character strings, which had no meaning under previous releases of z/OS XL C/C++, the compiler could interpret the data as a size modifier. Treatment of this condition is undefined and the behavior could be unexpected.

For a description of the potential results, see Unexpected output from fprintf() or fscanf().

If you are using z/OS V1R9 XL C/C++ compiler and you want the fprintf() and fscanf() families of functions to produce the same results as your previous compiler, change your source code input as shown in Table 1.
Table 1. Example: Code change for fprintf/fscanf character strings "%D", "%DD", and "%H"
Existing statement Modification required under z/OS V2R2 XL C/C++
printf(“This results in a 10%Deduction.\n”);
printf(“This results in a 10%%Deduction.\n”);