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