Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Conflicting compiler options

The COBOL for Windows compiler can encounter conflicting compiler options in either of two ways: both the positive and negative form of an option are specified at the same level in the hierarchy of precedence, or mutually exclusive options are specified at the same level in the hierarchy.

When conflicting options are specified at the same level in the hierarchy, the option specified last takes effect.

If you specify mutually exclusive compiler options at the same level, the compiler generates an error message and forces one of the options to a nonconflicting value. For example, if you specify both OPTIMIZE and TEST in the PROCESS statement in any order, TEST takes effect and OPTIMIZE is ignored.

However, options specified at a higher level of precedence override any options specified at a lower level of precedence. The compiler recognizes options in the following order of precedence from highest to lowest:

  1. Options specified in the PROCESS (or CBL) statement
  2. Options specified in the cob2 command invocation
  3. Options set in the COBOPT environment variable
  4. Default options

For example, if you code TEST in the COBOPT environment variable but OPTIMIZE in the PROCESS statement, OPTIMIZE takes effect because the options coded in the PROCESS statement and any options forced on by an option coded in the PROCESS statement have higher precedence.

Table 32. Mutually exclusive compiler options
Specified Ignored Forced on
CICS DYNAM NODYNAM
NOLIB LIB
NOTHREAD THREAD
MDECK NOLIB LIB
SQL NOLIB LIB
TEST OPTIMIZE NOOPTIMIZE

related references
Compiler environment variables
cob2 options
Compiler-directing statements


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)