Compiler option changes in Enterprise COBOL Version 5 and Version 6

A number of changes are made to compiler options in Enterprise COBOL V5 and V6.

The following options are new:

Table 1. Compiler options new with Enterprise COBOL Version 5 and Version 6
Compiler option Comments
AFP New option. It controls the compiler usage of the Additional Floating Point (AFP) registers that are provided by z/Architecture® processors.
  • From Enterprise COBOL V5.1, AFP(VOLATILE) is the default.
  • From Enterprise COBOL V6.2, AFP(NOVOLATILE) is the default.
ARCH New option. It specifies the machine architecture for which the executable program instructions are to be generated.
  • In Enterprise COBOL V5.1, ARCH(6) is the default.
  • In Enterprise COBOL V5.2 and V6.1, ARCH(6) is no longer accepted, and ARCH(7) is the default.
  • In Enterprise COBOL V6.2, a new higher level of ARCH(12) is accepted. ARCH(7) is still the default.
  • In Enterprise COBOL V6.3, ARCH(7) is removed, and a new higher level of ARCH(13) is accepted. ARCH(8) is the default.
CONDCOMP New option in Enterprise COBOL V6.3 with the service PTFs. It affects the behavior of conditional compilation directives and controls how conditional code will be displayed in the listing.
COPYLOC New option in Enterprise COBOL V6.1 with the service PTFs, V6.2 with the service PTFs, and from V6.3. It can be used to add either a PDSE (or PDS) dataset or z/OS® UNIX directory as an additional location to be searched for copy members during the library phase.
COPYRIGHT New option from Enterprise COBOL V5.2. It places a string in the object module if the object module is generated.
DEFINE New option from Enterprise COBOL V6.2. It assigns a literal value to a compilation variable that is defined in the program by using the DEFINE directive with the PARAMETER phrase.
DISPSIGN New option. It controls output formatting for DISPLAY of signed numeric items. DISPSIGN(COMPAT) is the default.
HGPR New option. It controls the compiler usage of the 64-bit registers provided by z/Architecture processors. HGPR(PRESERVE) is the default.
INITCHECK New option in Enterprise COBOL V5.2 with the service PTFs, V6.1 with the service PTFs, and from V6.2. It controls whether to check for uninitialized data items and issue warning messages when they are used without being initialized.
INITIAL New option in Enterprise COBOL V6.2 with the service PTFs and from V6.3. It causes a program and all of its nested programs to behave as if the IS INITIAL clause was specified on the PROGRAM-ID paragraph.
INLINE New option in Enterprise COBOL V6.1 with the service PTFs and from V6.2 and later versions. It controls the compiler to consider whether to inline procedures referenced by PERFORM statements in the source program. INLINE is a potential performance boosting option. (Note that INLINE was always in effect in COBOL V5.)
INVDATA New option in Enterprise COBOL V6.2 with the service PTFs and from V6.3. The option supercedes the deprecated ZONEDATA option. It tells the compiler whether data in USAGE DISPLAY and PACKED-DECIMAL data items is valid, and if not, what the behavior of the compiler should be.
To ease your migration to COBOL V5 or V6:
  • If your digits, sign code, and zone bits are valid, use NOINVDATA and the same NUMPROC setting that you used with COBOL V4 when using COBOL V5 or V6.
    Note: If you used NUMPROC(MIG) in V4, it is no longer available in COBOL V5 or V6 and you should use NUMPROC(NOPFD) in this scenario instead.
  • If you have invalid digits, invalid sign code, or invalid zone bits:
    • If you used NUMPROC(MIG) with COBOL V4, use INVDATA(FORCENUMCMP,NOCLEANSIGN) and NUMPROC(NOPFD) with COBOL V5 or V6.
    • If you used NUMPROC(NOPFD) with COBOL V4, use INVDATA(NOFORCENUMCMP,CLEANSIGN) (or simply INVDATA) with COBOL V5 or V6.
    • If you used NUMPROC(PFD) with COBOL V4, use INVDATA(NOFORCENUMCMP,CLEANSIGN) (or simply INVDATA) with COBOL V5 or V6.
LP New option from Enterprise COBOL V6.3. It indicates whether an AMODE 31 (31-bit) or AMODE 64 (64-bit) program should be generated with the related language features enabled. LP(32) is the default.
MAXPCF New option. It instructs the compiler not to optimize code if the program contains a complexity factor greater than n.
  • From Enterprise COBOL V5.1, MAXPCF(60000) is the default.
  • From Enterprise COBOL V6.2, MAXPCF(100000) is the default.
NUMCHECK New option in Enterprise COBOL V5.2 with the service PTFs, V6.1 with the service PTFs, and from V6.2. It controls whether to generate implicit numeric class tests for zoned decimal and packed decimal data items that are used as sending data items, and whether to generate SIZE ERROR checking for binary data items.
PARMCHECK New option in Enterprise COBOL V6.1 with the service PTFs and from V6.2. It tells the compiler to generate an extra data item following the last item in WORKING-STORAGE. This buffer data item is then used at run time to check whether a called subprogram corrupted data beyond the end of WORKING-STORAGE.
QUALIFY New option from Enterprise COBOL V5.2. It affects qualification rules and controls whether to extend qualification rules so that some data items that cannot be referenced under COBOL Standard rules can be referenced.
RULES New option from Enterprise COBOL V5.2. It requests information about your program from the compiler to improve the program by flagging certain types of source code at compile time.
SERVICE New option from Enterprise COBOL V5.2. It places a string in the object module if the object module is generated.
SQLIMS New option in Enterprise COBOL V5.1 with the service PTFs, and from V5.2. It enables the new IMS SQL coprocessor (called SQL statement coprocessor by IMS). The new coprocessor handles your source programs that contain embedded SQLIMS statements.
STGOPT New option. It controls storage optimization. NOSTGOPT is the default.

In Enterprise COBOL V5.1, V5.2, and V6.1, data items can get optimized with OPT(2) even when NOSTGOPT was in effect. NOSTGOPT was changed in Enterprise COBOL V6.1 with the service PTFs and from V6.2, so that no optimization of storage or data items occurs even with OPT(2). This is especially helpful for WORKING-STORAGE eye-catchers.

SUPPRESS New option from Enterprise COBOL V6.1. It controls whether to ignore the SUPPRESS phrase of COPY statements.
TUNE New option from Enterprise COBOL V6.3 with the service PTFs. It specifies the architecture for which the executable program will be optimized.

The default TUNE level matches the ARCH level if ARCH is specified. If ARCH is not specified, both ARCH and TUNE default to 8.

VLR New option in Enterprise COBOL V5.1 with the service PTFs and from V5.2. It affects the READ statement processing of variable length records that have length conflicts. VLR(STANDARD) is the default.

For details, see Variable length records - wrong length READ.

VSAMOPENFS New option from Enterprise COBOL V6.1. It affects the user file status reported from successful VSAM OPEN statements that require verified file integrity check.
XMLPARSE New option in Enterprise COBOL V5.1 with the service PTFs and from V5.2. It enables you to choose between parsing with the compatibility-mode COBOL XML parser from the COBOL library, or with the z/OS XML System Services parser. It can ease your migration to the Enterprise COBOL V5 or V6 compilers. XMLPARSE(XMLSS) is the default.
ZONECHECK New option in Enterprise COBOL V5.2 with the service PTFs and V6.1. It tells the compiler to generate IF NUMERIC class tests for zoned decimal data items that are used as sending data items.

In Enterprise COBOL V6.1 with the service PTFs and from V6.2, ZONECHECK is deprecated but is tolerated for compatibility. Consider using NUMCHECK(ZON) instead. For details, see NUMCHECK in the Enterprise COBOL for z/OS Programming Guide.

ZONEDATA New option from Enterprise COBOL V5.2. It tells the compiler whether data in USAGE DISPLAY and PACKED-DECIMAL data items is valid, and if not, what the behavior of the compiler should be.

Originally, Enterprise COBOL V5.2 at base level did not have the NOPFD suboption. In V5.2 with the service PTFs and from V6.1, the NOPFD suboption is added to let the compiler generate code that performs comparisons of zoned decimal data in the same manner as COBOL V4 does when using NUMPROC(NOPFD|PFD) in COBOL V4.

To ease your migration to COBOL V5 or V6:
  • If your digits, sign code, and zone bits are valid, use ZONEDATA(PFD) and the same NUMPROC setting that you used with COBOL V4 when using COBOL V5 or V6.
  • If you have invalid digits, invalid sign code, or invalid zone bits:
    • If you used NUMPROC(MIG) with COBOL V4, use ZONEDATA(MIG) and NUMPROC(NOPFD) with COBOL V5 or V6.
    • If you used NUMPROC(NOPFD) with COBOL V4, use ZONEDATA(NOPFD) and NUMPROC(NOPFD) with COBOL V5 or V6.
    • If you used NUMPROC(PFD) with COBOL V4, use ZONEDATA(NOPFD) and NUMPROC(PFD) with COBOL V5 or V6.
    Note: In Enterprise COBOL V6.2 and V6.3 with the service PTFs, ZONEDATA is deprecated but is tolerated for compatibility. Consider using INVDATA instead. For more details, see INVDATA in the Enterprise COBOL for z/OS Programming Guide.

For new compiler options in Enterprise COBOL Version 6, see Compiler options new with Enterprise COBOL Version 6.

The following options are modified:

Table 2. Compiler options changed with Enterprise COBOL Version 5 and Version 6
Compiler option Comments
CURRENCY From Enterprise COBOL 6.3, the literal argument to the CURRENCY option can no longer be the character 'U' or the character 'u'.
EXIT The EXIT compiler option is no longer mutually exclusive with the DUMP compiler option, and the compiler exits rules are updated.
INITCHECK In Enterprise COBOL V6.1 with the service PTFs, V6.2 with the service PTFs, and from V6.3 with the service PTFs, new suboptions LAX | STRICT are added to the INITCHECK option to control whether the compiler will issue warning messages for data items unless they are initialized on at least one, or on all, logical paths to a statement.
LANGUAGE

To change to uppercase English or Japanese compiler messages in COBOL V6, in addition to using the LANGUAGE compiler option, you must also set the Language Environment® runtime option NATLANG at compile time. We recommend using CEEOPTS DD in the compile JCL.

For example, to change messages to Japanese, use the LANGUAGE(JA) compiler option and also specify the NATLANG LE runtime option at compile time:
//CEEOPTS DD * 
          NATLANG(JPN)
/*
MAP In Enterprise COBOL V5.1 with the service PTFs and from V5.2, new suboptions HEX | DEC are added to the MAP compiler option to control whether hexadecimal or decimal offsets are shown for MAP output in the compiler listing.

Previous versions of Enterprise COBOL always showed hexadecimal offsets in MAP output, but Enterprise COBOL V5.1 at base level originally showed decimal offsets for MAP output. From Enterprise COBOL V5.1 with the service PTFs, new suboptions HEX and DEC are added to the MAP option. If MAP is specified with no suboption, it will be accepted as MAP(HEX).

This will give you the same behavior in Enterprise COBOL V5 or V6 as in earlier COBOL compilers. Thus, it can ease your migration to Enterprise COBOL V5 or V6 compilers.

MDECK The MDECK option no longer has a dependency on the LIB option, as the LIB option is removed. For details, see LIB.
NORENT NORENT can no longer be used with RMODE(ANY).

Execution of NORENT programs above the 16 MB line is not supported.

NOSTGOPT
  • From Enterprise COBOL V5.1, data items can get optimized with OPT(2) even when NOSTGOPT was in effect.
  • In Enterprise COBOL V6.1 with the service PTFs and from V6.2, NOSTGOPT was changed so that no optimization of storage or data items occurs even with OPT(2). This is especially helpful for WORKING-STORAGE eye-catchers.
NUMCHECK From Enterprise COBOL V6.3, when invalid data is found at compile time and regardless of whether NUMCHECK(MSG) or NUMCHECK(ABD) is in effect, an error-level message is produced and the check is removed.
OPTIMIZE The OPTIMIZE option is modified to allow more levels of performance optimization for your application. The previous OPTIMIZE option format is deprecated but is tolerated for compatibility.
Note: Although OPT(0) is equivalent to the NOOPTIMIZE option in previous compilers, it now removes some code that previously was not removed.

The storage optimization provided by the old FULL suboption of OPT is now provided by the new compiler option STGOPT.

RMODE(ANY) RMODE(ANY) can no longer be used with NORENT.
RULES In Enterprise COBOL V6.2 with the service PTFs and from V6.3, the following new suboptions are added to the RULES compiler option:
  • OMITODOMIN | NOOMITODOMIN tells the compiler whether to issue warning messages for any OCCURS DEPENDING ON clauses that are specified without integer-1 (the minimum number of occurrences).
  • UNREF | NOUNREFALL | NOUNREFSOURCE tells the compiler whether to issue warning messages for unreferenced data items, and to control whether the reporting is done only for data items not declared in a copy member (NOUNREFSOURCE) or all data items (NOUNREFALL).
  • LAXREDEF | NOLAXREDEF tells the compiler whether to issue warning messages when a data item is redefined to a smaller item on any level.
SOURCE From Enterprise COBOL V6.3 with the service PTFs, new suboptions DEC | HEX are added to SOURCE compiler option. If SOURCE(DEC) is in effect, the line numbers for the listing of the source will be in decimal format. If SOURCE(HEX) is in effect, the line numbers for the listing of the source will be in hexadecimal format.
SSRANGE The compiled-in range checks cannot be disabled at run time using the CHECK(OFF) runtime option.

In Enterprise COBOL V5.2 with the service PTFs and from V6.1, new suboptions ZLEN | NOZLEN are added to the SSRANGE compiler option to control how the compiler checks reference modification lengths.

In Enterprise COBOL V6.1 with the service PTFs and from V6.2, new suboptions MSG | ABD are added to the SSRANGE compiler option to control the runtime behavior of the COBOL program when a range check fails.

TEST
  • From Enterprise COBOL V5.1, the HOOK | NOHOOK and SEPARATE | NOSEPARATE suboptions of the TEST compiler option have been removed. If specified,
    • HOOK - compiled in hooks are not available.
    • NOHOOK - NOHOOK behavior is always in effect
    • SEPARATE - Compiler always places debugging info in object
    • NOSEPARATE - NOSEPARATE behavior is always in effect
    New suboptions SOURCE and NOSOURCE are added to the TEST compiler option.
    Note: EJPD and NOEJPD subotions are still supported. With Debug Tool V12 with APAR PM75819 or Debug Tool V13 or later, you can do JUMPTO or GOTO even if you compile with the TEST(NOEJPD) option and a non-zero OPTIMIZE level. You must, however, use the Debug Tool command SET WARNING OFF and you may get unpredictable results.

    The NOTEST option is enhanced to include the suboptions DWARF | NODWARF.

    Note: Even though DWARF debugging information is always placed in the object program as NOLOAD segments, these NOLOAD segments will not take storage at runtime, unless Debug Tool, CEEDUMP, Fault Analyzer, Application Performance Analyzer or a 3rd-party vendor tool that uses DWARF debugging data is used
  • From Enterprise COBOL V6.2, new suboptions SEPARATE | NOSEPARATE are added to the TEST compiler option to control program object size on disk while retaining debugging capability. In addition, new combinations of suboptions are supported in both the TEST and NOTEST compiler options, including TEST(NODWARF), TEST(SEPARATE), and NOTEST(DWARF,SOURCE).

For modified compiler options in Enterprise COBOL Version 6, see Compiler option changed with Enterprise COBOL Version 6.

The following options are removed:

Table 3. Compiler options not available in Enterprise COBOL Version 5 and Version 6
Compiler option Comments
DATEPROC Support for Year 2000 extensions has been removed.
LVLINFO From Enterprise COBOL V6.1, the LVLINFO installation option is removed. The build level information is put where LVLINFO used to be, and the SERVICE compiler option can be used for user service level information in place of LVLINFO.
LIB The compiler behaves as though COPY, BASIS, or REPLACE statements are included in a program and searches for the specified library or libraries to retrieve the copied code referenced in those statements.

For details about how to define the source libraries, see Specifying source libraries (SYSLIB) in the Enterprise COBOL for z/OS Programming Guide.

NUMPROC(MIG)

NUMPROC(PFD) and NUMPROC(NOPFD) are still available. If NUMPROC(MIG) is specified, Enterprise COBOL V5 or V6 issues a warning message and the compilation will get the default setting for NUMPROC. This is either the user-customized default or the IBM® default, which is NUMPROC(NOPFD).

To migrate your programs compiled with NUMPROC(MIG) to Enterprise COBOL V6, consider using the NUMCHECK compiler option to help you migrate to NUMPROC(PFD):
  1. Compile your programs with NUMCHECK(ZON,PAC) and NUMPROC(PFD).
  2. Run a thorough regression test with a good breadth of input data.
If your applications get no NUMCHECK messages or NUMCHECK abends, you can safely compile with NUMPROC(PFD) and NONUMCHECK for production. This will not only solve the invalid data problem, but NUMPROC(PFD) is the most efficient setting for the NUMPROC compiler option.

For details, see NUMCHECK in the Enterprise COBOL for z/OS Programming Guide.

SIZE
  • In Enterprise COBOL V5.1, the SIZE option value is no longer an upper-limit for the total storage used by a COBOL compilation. In addition, the SIZE suboption value MAX is no longer supported. The default value for the SIZE option is SIZE(5000000). For more information about compiler memory requirements, see Changes in compiling with Enterprise COBOL Version 5 and Version 6.
  • From Enterprise COBOL V5.2, the SIZE option has been removed.
YEARWINDOW Support for Year 2000 extensions has been removed.
ZONECHECK In Enterprise COBOL V6.1 with the service PTFs and from V6.2, ZONECHECK is deprecated but is tolerated for compatibility, and it is replaced by NUMCHECK(ZON).

For removed compiler options in Enterprise COBOL Version 6, see Compiler option not available in Enterprise COBOL Version 6.

The following options were obsolete in Enterprise COBOL V4, but were tolerated with informational or warning messages to ease migration from V3 or prior versions. With Enterprise COBOL V5 and V6, these options are no longer tolerated, and specifying any of them will result in an error message.
  • CMPR2
  • EVENTS
  • FDUMP
  • FLAGSAA
  • PFDSIGN
  • RES

For a detailed list of options supported for the various compiler versions, see Option comparison.

For a detailed list of compiler options that can affect performance, see How to tune compiler options to get the most out of V6 in the Enterprise COBOL Performance Tuning Guide.

For detailed descriptions of all the compiler options, see Compiler options in the Enterprise COBOL Programming Guide.