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.
  • Start of changeIn Enterprise COBOL V5.1, V5.2, and V6.1, AFP(VOLATILE) is the default.End of change
  • Start of changeIn Enterprise COBOL V6.2, AFP(NOVOLATILE) is the default.End of change
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.
  • Start of changeIn Enterprise COBOL V5.2 and V6.1, ARCH(6) is no longer accepted, and ARCH(7) is the default. End of change
  • Start of changeIn Enterprise COBOL V6.2, a new higher level of ARCH(12) is accepted. ARCH(7) is still the default. End of change
Start of changeCOPYLOCEnd of change Start of changeNew option in Enterprise COBOL V6.2 with the service PTFs. 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.End of change
COPYRIGHT New option in Enterprise COBOL V5.2. It places a string in the object module if the object module is generated.
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 V6.2. It controls whether to check for uninitialized data items and issue warning messages when they are used without being initialized.
Start of changeINITIALEnd of change Start of changeNew option in Enterprise COBOL V6.2 with the service PTFs. 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.End of change
MAXPCF New option. It instructs the compiler not to optimize code if the program contains a complexity factor greater than n.Start of change
  • Start of changeIn Enterprise COBOL V5.1, V5.2, and V6.1, MAXPCF(60000) is the default.End of change
  • Start of changeIn Enterprise COBOL V6.2, MAXPCF(100000) is the default.End of change
End of change
Start of changeNUMCHECKEnd of change Start of changeNew option in Enterprise COBOL V5.2 with the service PTFs, V6.1 with the service PTFs, and 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.End of change
QUALIFY New option in 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 in 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 in Enterprise COBOL V5.2. It places a string in the object module if the object module is generated.
SQLIMS New option. 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.

Originally, Enterprise COBOL V5.1 at base level did not have the SQLIMS option; but with current service applied, V5.1 is like V5.2 and now has the SQLIMS option.

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

VLR New option. It affects the READ statement processing of variable length records that have length conflicts. Start of changeVLR(STANDARD) is the default.End of change

Originally, Enterprise COBOL V5.1 at base level did not have the VLR option and had some migration issues; but with current service applied, V5.1 is like V5.2 and now has the VLR option. For details, see Variable length records - wrong length READ.

XMLPARSE New option. 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.

Originally, Enterprise COBOL V5.1 at base level did not have the XMLPARSE option and had some migration issues; but with current service applied, V5.1 is like V5.2 and now has the XMLPARSE option.

ZONECHECK New option in Enterprise COBOL V5.2 with the PTFs for APAR PI40822 installed. It tells the compiler to generate IF NUMERIC class tests for zoned decimal data items that are used as sending data items.

Start of changeIn Enterprise COBOL V6.1 with current service applied, ZONECHECK is deprecated but is tolerated for compatibility. Consider using NUMCHECK(ZON) instead. For details, see Start of changeNUMCHECKEnd of change in the Enterprise COBOL for z/OS Programming Guide.End of change

ZONEDATA New option in Enterprise COBOL V5.2. It tells the compiler whether data in USAGE DISPLAY Start of changeand PACKED-DECIMALEnd of change 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 PTF for APAR PI40853 installed, 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 Start of changedigits, sign code, and zone bitsEnd of change 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 Start of changeinvalid digits, invalid sign code, or invalid zone bitsEnd of change:
    • 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.
Table 2. Compiler options new with Enterprise COBOL Version 6
Compiler option Comments
Start of changeCOPYLOCEnd of change Start of changeNew option in Enterprise COBOL V6.2 with the service PTFs. 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.End of change
Start of changeINITCHECKEnd of change Start of changeNew option in Enterprise COBOL V6.1 with the service PTFs and V6.2. It controls whether to check for uninitialized data items and issue warning messages when they are used without being initialized.End of change
Start of changeINITIALEnd of change Start of changeNew option in Enterprise COBOL V6.2 with the service PTFs. 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.End of change
Start of changeDEFINEEnd of change Start of changeNew option in 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.End of change
Start of changeINLINEEnd of change Start of changeNew option in Enterprise COBOL V6.1 with the service PTFs and V6.2. It controls the compiler to consider whether to inline procedures referenced by PERFORM statements in the source program. End of change
Start of changeNUMCHECKEnd of change Start of changeNew option in Enterprise COBOL V6.1 with the service PTFs and 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.End of change
Start of changePARMCHECKEnd of change Start of changeNew option in Enterprise COBOL V6.1 with the service PTFs and 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.End of change
SUPPRESS New option in Enterprise COBOL V6.1. It controls whether to ignore the SUPPRESS phrase of COPY statements.
VSAMOPENFS New option in Enterprise COBOL V6.1. It affects the user file status reported from successful VSAM OPEN statements that require verified file integrity check.

The following options are modified:

Table 3. Compiler options changed with Enterprise COBOL Version 5 and Version 6
Compiler option Comments
EXIT The EXIT compiler option is no longer mutually exclusive with the DUMP compiler option, and the compiler exits rules are updated.
MAP New suboptions HEX and 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 originally always showed decimal offsets for MAP output. Enterprise COBOL V5.1 was changed via service to have new suboptions HEX and DEC to the MAP option. Enterprise COBOL V5.2 and V6 has both new MAP suboptions as well. In V5.1 with service and V5.2 or V6 compilers, 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 compiler behaves as though the LIB option is always enabled.
NORENT NORENT can no longer be used with RMODE(ANY).

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

Start of changeNOSTGOPTEnd of change Start of changeIn Enterprise COBOL V5.1, V5.2, and 6.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 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.End of change
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.
SSRANGE The compiled-in range checks cannot be disabled at run time using the runtime options CHECK(OFF) or NOSSRANGE.

New suboptions ZLEN and NOZLEN are added to the SSRANGE compiler option in V5.2 with the service PTFs and V6 to control how the compiler checks reference modification lengths.

Start of changeNew suboptions MSG and ABD are added to the SSRANGE compiler option in V6.1 with the service PTFs and V6.2 to control the runtime behavior of the COBOL program when a range check fails.End of change

Note: The compiler option NOSSRANGE is still supported.
TEST
  • In Enterprise COBOL V5.1, V5.2, and V6.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 and 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
  • Start of changeIn Enterprise COBOL V6.2, new suboptions SEPARATE and 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).End of change
Table 4. Compiler option changed with Enterprise COBOL Version 6
Compiler option Comments
Start of changeAFPEnd of change Start of changeIt controls the compiler usage of the Additional Floating Point (AFP) registers that are provided by z/Architecture processors.
  • Start of changeIn Enterprise COBOL V6.1, AFP(VOLATILE) is the default.End of change
  • Start of changeIn Enterprise COBOL V6.2, AFP(NOVOLATILE) is the default.End of change
End of change
Start of changeARCHEnd of change Start of changeIt specifies the machine architecture for which the executable program instructions are to be generated.
  • Start of changeIn Enterprise COBOL V6.1, ARCH(7) is the default. End of change
  • Start of changeIn Enterprise COBOL V6.2, a new higher level of ARCH(12) is accepted, and ARCH(7) is still the default. End of change
End of change
Start of changeMAXPCFEnd of change Start of changeNew option. It instructs the compiler not to optimize code if the program contains a complexity factor greater than n.Start of change
  • Start of changeIn Enterprise COBOL V6.1, MAXPCF(60000) is the default.End of change
  • Start of changeIn Enterprise COBOL V6.2, MAXPCF(100000) is the default.End of change
End of change End of change
Start of changeNOSTGOPTEnd of change Start of changeIn Enterprise COBOL V6.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 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.End of change
Start of changeRULESEnd of change Start of changeIn Enterprise COBOL V6.2 with PTFs installed, 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).
End of change
Start of changeSSRANGEEnd of change Start of changeNew suboptions MSG and ABD are added to the SSRANGE compiler option in V6.1 with the service PTFs and V6.2 to control the runtime behavior of the COBOL program when a range check fails.End of change
TEST In Enterprise COBOL V6.2, new suboptions SEPARATE and 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).
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)
/*

The following options are removed:

Table 5. Compiler options not available in Enterprise COBOL Version 5 and Version 6
Compiler option Comments
DATEPROC Support for Year 2000 extensions has been removed.
NOLIB Compiler behaves as though LIB is always in effect.
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 Start of changeNUMCHECKEnd of change compiler option to help you migrate to NUMPROC(PFD):
  1. Compile your programs with Start of changeNUMCHECK(ZON,PAC)End of change and NUMPROC(PFD).
  2. Run a thorough regression test with a good breadth of input data.
If your applications get no Start of changeNUMCHECKEnd of change messages or Start of changeNUMCHECKEnd of change abends, you can safely compile with NUMPROC(PFD) and Start of changeNONUMCHECKEnd of change for production. This will not only solve the invalid data problem, but NUMPROC(PFD) is the most efficient setting for the NUMPROC compiler option.

Start of changeFor details, see Start of changeNUMCHECKEnd of change in the Enterprise COBOL for z/OS Programming Guide.End of change

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.
  • In Enterprise COBOL V5.2 and V6, the SIZE option has been removed.
YEARWINDOW Support for Year 2000 extensions has been removed.
Start of changeZONECHECKEnd of change Start of changeIn Enterprise COBOL V6.1 with the service PTFs and V6.2, ZONECHECK is deprecated but is tolerated for compatibility, and it is replaced by NUMCHECK(ZON).End of change
Table 6. Compiler option not available in Enterprise COBOL Version 6
Compiler option Comments
LVLINFO Installation option 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.
Start of changeZONECHECKEnd of change Start of changeIn Enterprise COBOL V6.1 with the service PTFs and V6.2, ZONECHECK is deprecated but is tolerated for compatibility, and it is replaced by NUMCHECK(ZON).End of change
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.
  • Start of changeCMPR2End of change
  • EVENTS
  • FDUMP
  • FLAGSAA
  • PFDSIGN
  • RES

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

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