Miscellaneous Options

--acceptrefresh This option takes the most recent value of what was entered on the screen and then uses that value in subsequent ACCEPT statements. If you enter something in a screen section that goes to a variable, then MOVE something to that variable, the --acceptrefresh option will allow the subsequently MOVED value to be the basis of what is in the next ACCEPT statement.
--arithmeticVSC2 Causes truncation of intermediate results in arithmetic statements to follow the rules of VS COBOL II and COBOL/370.
--binaryMath Causes the compiler to use binary math operations to handle arithmetic as long as the target runtime supports these operations; this can be abbreviated --bin.
--brand serial#      Causes the compiler to embed the specified value into the object file. serial# is a separate argument of up to 20 characters. When you specify this option and a value, the COBOL object is associated with the value of serial# in such a way that it will execute only with a runtime that has the corresponding serial number. Attempts to execute the program with a runtime that has a different serial number (either as the initial program, or as a called subprogram) result in the runtime displaying the message Incorrect serial number and returning a call error of 28. To display a runtime's serial number, execute the runtime with the -v option.
--decimalMath Causes the compiler to use decimal math operations to handle arithmetic, overriding other compiler flags; can be abbreviated --dec. This is the default behavior. You may wish to experiment with the --binaryMath options, which may improve performance; however, you should test precision and accuracy.
--defines This option must be followed by the name of a file as the next separate argument. This option causes the compiler to find all level 78s in a COPY file and create equivalent C-language #define statements in the specified file. See Help, Version Information, and Communication With C Programs for more information.
--newARC With --newARC, the syntax rules for Abbreviated Combined Relation conditions become relaxed to allow for parenthesis to appear immediately after the relation.

For example:

IF A = (B OR C OR D)
would now be accepted by the compiler.
--oldARC This option is the default behavior and specifies the standard syntax is to be used for Abbreviated Combined Relations. This syntax is described in Abbreviated Combined Relation Conditions.
--relaxRBUsing

ECN 2770 in version 6.2.0 corrected an issue where the compiler incorrectly allowed indexed data items as the USING data item for a Radio Button (contrary to the documentation). This error was discovered from a crash that occurred in a customer program. However, some customers were using the invalid syntax without error. This ECN allows those customers to continue to do so, though unsupported.

This option allows USING data items to be indexed data items, as was allowed prior to ECN 2770.

Note: The use of Indexed data items in the USING clause for Radio Buttons remains unsupported syntax. Additionally, this option is NOT included in AcuBench
-Za Causes the compiler to generate code to test array references at run time. If an index is used which is out-of-bounds, the run-time system displays an error message showing the index value and the allowed bounds. (This causes some extra code to be generated and prevents certain table optimizations from occurring, so it should be turned off once a program is fully debugged.) With this option, the compiler does not re-use previously computed index values.

Because subscript overflow is the most common cause of memory access violation errors, adding this option is a good first step when you are looking for the cause of a memory access violation. (See Memory Access Violations for more details.)

This option also generates code that performs range checking on reference modification at runtime. Reference modification that creates a data item whose size or leftmost position parameter is out of range of the data item it references causes the runtime to display the error message Reference modifier range error.

This option also causes the runtime to test the LINKAGE items automatically. When an item defined in the Linkage Section is not referenced in the USING phrase of the Procedure Division statement and has not had an address assigned to it with the SET ADDRESS OF phrase, the run-time returns an error message.

The -Za option also specifies size testing of linkage items passed to sub-programs. when a LINKAGE SECTION parameter of a size larger than the caller passed is detected, an error to that effect is reported.

-Zc This compact option causes ACUCOBOL-GT to optimize for smaller code instead of faster code.
-Zd Although still supported, this option has been replaced by the -Gd option. Both options produce the same results.
-Ze

This option adds XML symbol table information to the COBOL object for use by XML Extensions.

Programs using XML Extensions must be compiled with the -Ze option. Add the -Ze compiler option to the compile command to include the XML symbol table information in the compiled COBOL object.

-Zg Enables the use of segmentation (overlays) in the source. If this option is not used, section numbers will be ignored.This option applies only to Version 7.2 and earlier source files.
-Zi Causes the program to be compiled as if it had the IS INITIAL PROGRAM phrase specified in its PROGRAM-ID paragraph. This can be useful, in some cases, when you are compiling programs that do not contain adequate memory management (no CANCEL verbs, for example). See PROGRAM-ID Paragraph for details on IS INITIAL PROGRAM.
-Zl All data items may be larger than 64 KB. This option is obsolete. In versions prior to 6.0, this option caused the compiler to allow data items larger than 64 KB.
-Zm Causes the compiler to generate code that tells the runtime the size of a data item specified in a Format 7 SET Statement, as in:
SET pointer TO ADDRESS OF data-item.

This option supports thin client applications that pass pointers in calls to DLLs on the display host.

-Zn This turns off ACUCOBOL-GT's local optimizer. This is useful primarily to see if the optimizer is introducing errors in the generated object code. This option also prevents the compiler from re-using previously computed index values.
-Zo Although still supported, this option has been replaced by the -Fo option. Both options produce the same results.
-Zr Allows for a recursive PERFORM Statement. When this switch is used, the PERFORM verb is modified so that return addresses are stored on a stack. Only the most recent PERFORM statement has an active return address. When this option is used, a paragraph under the control of a PERFORM statement may (directly or indirectly) PERFORM itself. See PERFORM_STACK for more information>.

This behavior is the default. For backward compatibility, -Zr acts like -Zr1. If you compile for compatibility with Version 3.1 or earlier, recursive PERFORMs are turned off by default. This behavior may affect existing programs that do not compile for earlier compatibility. Event procedures require the ability to do recursive PERFORMs.

-Zr0 This option tells the compiler not to allow recursive PERFORMs. Event procedures require the ability to do recursive PERFORMs.
-Zr1 This option tells the compiler to allow recursive PERFORMs. Event procedures require the ability to do recursive PERFORMs.
-Zs Although still supported, this option has been replaced by the -Gy option. Both options produce the same results.
-Zw This option prepares a program for import into the AcuBench Screen Designer. It causes the compiler to mark windows and screen controls with additional information that can be used by the graphical screen import utility or Character-to-GUI Wizard. Graphical windows imported into the Screen Designer will be more complete if the program is first compiled with this option, and character-based screens converted by the wizard are more likely to contain the proper control type for each field. Using this option makes your compiled program somewhat larger, so you should use it only when you are importing screens into the workbench. See -import and -- char2gui in Using the runtime System for related information.

You can also use the -Ml, -Mm, and -Mu options to affect the case of the additional information. This will affect how these items are seen in the Screen Designer, and in your subsequently generated code. Specifying -Zw -Ml will cause the data imported into the Screen Designer to be in lowercase. The default is uppercase (-Mu). To specify uppercase for the first letter of each word, and lower case for the rest of each word, use -Mm.

If you compile with -Zw, your screens may use only literal reference modifications, i.e., data-item(4:20), for any of their data items to be imported into workbench correctly. Data items that use more complicated variants of reference modification do not import correctly. For example, data-item(data-start:data-length) imports as data-item(:), and you need to insert the correct values into the workbench.

-Zx Although still supported, this option has been replaced by the -Fx option. Both options produce the same results.
-Zy This option lets you treat ACCEPT FROM DATE as ACCEPT FROM CENTURY-DATE, and ACCEPT FROM DAY as ACCEPT FROM CENTURY-DAY. If you use this option, the 4-digit year format will be used for ACCEPT FROM DATE providing that:
  • The receiving field is numeric or numeric edited and contains eight or more integer digits; or
  • The receiving field is not numeric or numeric edited and contains eight or more character positions.
If neither of the above conditions applies, then ACCEPT FROM DATE will return its normal 6-digit format even if you use -Zy.ACCEPT FROM DAY works in the same fashion, except that the receiving field must have seven or more digits/positions in order to receive the new format.

Information on ACCEPT FROM DATE and ACCEPT FROM DAY is in Procedure Division Statements.

-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.

-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.

-Z3 Causes ACUCOBOL-GT to produce programs that can be run by the Version 1.3 runtime system. Specifying this will limit several features of later versions. If you use a restricted feature, you will receive an error message at compile time. This flag also implies the -C3 option to ensure compatible behavior of the compiled program (see above).
-Z4 Similar to the -Z3 option, except that the produced object can be run by the Version 1.4 runtime system. Implies -C4.
-Z5 Causes the compiler to produce object files that can be run by the Version 1.5 runtime system. This option implies -C5.
-Z20 Creates object code that can be run with a Version 2.0 runtime (chart verbs are not supported). This option implies -C20.
-Znn Creates object code that can be run with a Version nn runtime.
nn is the version number of product; for example, -Z21 for version 2.1, -Z60 for version 6.0, and so on.
Notes:
  • From version 10.0 onwards, 3 digits are used to represent the version number; for example -Z100 for version 10.0, -Z101 for version 10.1, and so on.
  • Using this option with a version earlier than 8.0 generates a warning.