In the ACUCOBOL-GT User's Guide Version 7, Chapter 2.1.13, Miscellaneous Options, it states that -Zz can be used to convert spaces to numeric in the excerpt below. Does the -Zz option convert embedded spaces and trailing spaces as well as leading spaces in a USAGE DISPLAY numeric item to zeros?
-Zz This option causes spaces in a USAGE DISPLAY numeric item to be treated as the value zero, and non-numeric data to be treated as numeric. It does this by treating the high-value half of each byte as "3" so as to bring all bytes in the variable within the range of 30 to 3F.
The following test program below demostrates that leading, trailing, and embedded spaces are all converted by utilizing the -Zz compiler option. The program was executed three times using the version 8.0.1 compiler and runtime. The following is a table that contains the inputs for each iteration and the corresponding outputs.
First spacespace1 &n bsp; 1
Second 1spacespace 100
Third 1space1 101
It should be noted, however, that utilizing the -Zz compiler option can have adverse performance implications as noted in the same section of the documentation.
"-Zz" must be specified at compile time in order to prevent the optimizer from mis-constructing the program. Note that this option should be used only if you need it, because it causes less efficient programs to be produced.
PROGRAM-ID. & nbsp; ZzUsage.
SPECIAL-NAMES. &nbs p;
01 my-var pic 9(3) usage display.
Main-logic. & nbsp;
accept my-var at 0303.
display "my-var = 1" at 0503
display "my-var = 100" at 0503
display "my-var = 101" at 0503
display "invalid value" at 0503