Start of change

What is new in Enterprise COBOL for z/OS 6.4 and COBOL 6.4 with PTFs installed

This section lists new and improved features in Enterprise COBOL for z/OS® 6.4 and Enterprise COBOL for z/OS 6.4 with PTFs installed.

Enterprise COBOL for z/OS supports the continuous delivery (CD) model so that you can receive new features and enhanced capabilities as soon as the code is ready without waiting for the next release. The below feature descriptions that begin with an APAR number are introduced in the PTFs that are shipped with Enterprise COBOL for z/OS 6.4. Install the latest PTFs using the FIXCAT feature of SMP/E to take advantage of these features. For more information on SMP/E FIXCATs, see Determining service required. For more information on PTFs and APARs for Enterprise COBOL for z/OS, see the COBOL for z/OS support page.

The enhancements that are described in this section also have an associated cross-reference to the COBOL publications for your convenience.

The changes mainly fall into the following categories:

Improved COBOL/Java interoperability

The COBOL/Java interoperability is enhanced to extend the capabilities of your COBOL applications with Java and removes the need to write object-oriented (OO) COBOL. The following changes are introduced to facilitate COBOL applications interoperating with Java:
Non-OO COBOL/Java interoperability support
Enterprise COBOL supports a more comprehensive and flexible form of Java interoperability than that provided by the object-oriented (OO) COBOL framework. (COBOL/Java interoperability outside of the object-oriented (OO) COBOL framework)
New JAVAIOP option
The JAVAIOP option controls the behavior of COBOL programs that interoperate with Java through the JAVA-CALLABLE or JAVA-SHAREABLE directives or by calling Java static methods using the CALL statement. (JAVAIOP)
New JAVA-CALLABLE directive
The JAVA-CALLABLE directive instructs the compiler to make the COBOL program automatically callable from Java. The directive must appear before the PROCEDURE DIVISION header for the outermost program of a compilation unit. (JAVA-CALLABLE)
New JAVA-SHAREABLE directive
You can use the JAVA-SHAREABLE ON and JAVA-SHAREABLE OFF directives to bracket one or more WORKING-STORAGE data items to indicate that they are to be made read/write accessible from Java applications interoperating with this COBOL program. (JAVA-SHAREABLE)
Enhanced CALL statement
The CALL statement is enhanced to enable the compiler to call a static Java method. A Java call stub program that is automatically generated and serves as an interface between the COBOL calling program and the static Java method. (CALL statement)

Start of changePH48453: New sample files demonstrating a COBOL/Java interoperable application and how to build it are provided in the demo subdirectory of the COBOL install directory in the z/OS UNIX file system. (Example: COBPROD application)End of change

Start of changePH49715: A new cjbuild command reference section is added to address various usability and stability issues relating to the non-OO Java/COBOL interoperability. (cjbuild command reference)End of change

Start of changePH51752: A new sample JCL is provided to demonstrate how a non-OO COBOL/Java interoperable application can be built and run entirely using JCL. (Sample JCL for building and running the COBPROD application)End of change

Start of changePH53631: Enhanced the ON EXCEPTION phrase support to deal with exceptions in the non-OO COBOL/Java interoperability framework. (Handling errors in Java-interoperable COBOL applications)End of change

Interoperability between AMODE 31 (31-bit) and AMODE 64 (64-bit) COBOL programs

AMODE 64 (64-bit) COBOL applications can interoperate with your existing AMODE 31 (31-bit) COBOL applications. Dynamic call is supported in a mixed AMODE 31/AMODE 64 environment. (COBOL applications with mixed AMODE 31 and AMODE 64 programs)

Runtime APAR PH59864 (V2R5 or later): When PTFs for LE APAR PH56800 and COBOL Runtime APAR PH59864 are installed on z/OS 2.5 or later systems where COBOL programs run, the AMODE 31 subprograms called by the caller program can be either a DLL or a non-DLL. (Dynamic call between AMODE 31 and AMODE 64 programs)

User-defined functions support

You can define your own functions by specifying a FUNCTION-ID paragraph in the IDENTIFICATION DIVISION and invoke them by using a reference to a function identifier. This is part of the 2002 COBOL Standard.

The following language elements are enhanced to provide the user-defined functions support:
Function IDENTIFICATION DIVISION
For a user-defined function, the first paragraph of the IDENTIFICATION DIVISION must be the FUNCTION-ID paragraph.
User-defined function configuration section
Specify the configuration section in the ENVIRONMENT DIVISION of a user-defined function definition. (REPOSITORY paragraph)
Function procedure division
The function procedure division consists of optional declaratives, and procedures that contain sections, paragraphs, sentences, and statements.
CONTENT-OF intrinsic function
The CONTENT-OF intrinsic function returns the content of the argument. The CONTENT-OF intrinsic function is useful when you want to pass an argument to a user-defined function that is effectively BY CONTENT. (CONTENT-OF)
Using user-defined functions
You can write your own function definitions that may be invoked by using the FUNCTION keyword. (Using user-defined functions)
Start of change

Function prototypes support

PH57397: With a function prototype, you can define the function name, parameters, and returning value of a user-defined function or other non-COBOL external functions such as C functions and invoke these functions. This is part of the 2014 COBOL Standard.

The following language elements are enhanced to provide the function prototypes support:
Function IDENTIFICATION DIVISION
For a function prototype, the first paragraph of the IDENTIFICATION DIVISION must be the FUNCTION-ID paragraph.
Function prototype procedure division
The function prototype procedure division consists only of the function prototype division header.
Using function prototypes
You can use function prototypes to invoke COBOL user-defined functions. (Using function prototypes)
End of change
Start of change

Enhanced UTF-8 support

Start of changePH48667: When you use the figurative constant HIGH-VALUE in a context that requires UTF-8 characters, its value is UTF-8 character UX'F48FBFBF' corresponding to Unicode code point U+10FFFF, except when HIGH-VALUE is used in a move or compare operation with a fixed byte-length UTF-8 data item that has a length that is not a multiple of 4 bytes. (Using UTF-8-character figurative constants)End of change

Start of changePH57297: You can use UTF-8 (PIC U) data items as the arguments to the STRING and UNSTRING statements. (STRING statement and UNSTRING statement)
Note: COBOL Runtime LE APAR PH57264 (for AMODE 31) or APAR PH57265 (for AMODE 64) must also be applied on all systems where programs that make use of this new feature are linked or run.
End of change
Start of changePH57400: You can use dynamic-length and UTF-8 (PIC U) data items as the arguments to the JSON GENERATE and JSON PARSE statements. (JSON GENERATE statement and JSON PARSE statement)
Note: COBOL Runtime LE APAR PH57152 must also be applied on all systems where programs that make use of this new feature are linked or run.
End of change
End of change

JSON enhancements

Improved integration with IBM Automatic Binary Optimizer for z/OS (ABO)

COBOL modules that you compile today can be easily optimized in the future by ABO to utilize future IBM Z® hardware enhancements, without having to be recompiled.
  • ABO (sold separately) improves the performance of already-compiled COBOL program modules without recompiling, source code migration, or performance tuning.
  • With the new SMARTBIN compiler option in effect, COBOL compiler generates modules containing additional binary metadata that enables them to be optimized by ABO 2.2. (SMARTBIN)
  • Use the latest version of Enterprise COBOL for new development, modernization, and maintenance. Use ABO to improve the performance of COBOL modules that are stable and do not need any source changes.
For details about ABO, visit the ABO product page.

Compiler option changes

New compiler options
SMARTBIN
Use SMARTBIN to instruct the compiler to generate modules containing additional binary metadata that enables them to be optimized by IBM® Automatic Binary Optimizer (ABO) for z/OS 2.2. (SMARTBIN)
JAVAIOP
Use JAVAIOP to control the behavior of COBOL programs that interoperate with Java through the JAVA-CALLABLE or JAVA-SHAREABLE directives or by calling Java static methods using the CALL statement. (JAVAIOP)
Start of changeCONDCOMPEnd of change
Start of changePH50296: CONDCOMP compiler option is introduced to control how conditional code will be displayed in the listing. (CONDCOMP)End of change
Modified compiler options
ARCH
ARCH(8) and ARCH(9) are no longer accepted. A new higher level of ARCH(14) is accepted. ARCH(10) is the default. (ARCH)
RULES
If there are multiple RULES specifications for a compilation, the suboptions are additive, which means they are accumulated. (RULES)
TUNE
TUNE(8) and TUNE(9) are no longer accepted. A new higher level of TUNE(14) is accepted. TUNE(10) is the default if ARCH is not specified. (TUNE)
Start of changeNUMCHECKEnd of change
Start of changeThe NUMCHECK compiler option is updated to avoid generating runtime checking code of zoned-decimal senders in MOVE statements when the receiver is an alphanumeric data item and NUMCHECK(ZON(LAX)) is in effect. End of change
Start of changeStart of changePH50295: The NUMCHECK compiler option is updated to avoid generating runtime checking code of zoned decimal senders in MOVE statements when the receiver is an alphanumeric data item and NUMCHECK(ZON(LAX))is in effect.(NUMCHECK) End of changeEnd of change

Runtime changes

PERFORM … UNTIL EXIT support
You can specify EXIT in place of a condition in a PERFORM statement. If the UNTIL phrase with the EXIT reserved word is specified, execution proceeds exactly as if the same PERFORM statement were coded with condition-1 specified, except that condition-1 never evaluates as true. (PERFORM with UNTIL phrase)
Start of changeVSAM dynamic access optional logic pathEnd of change
Start of changePH56036 and PH56037: An optional alternate logic path is introduced for VSAM files that use the ACCESS IS DYNAMIC mode. The alternate logic path uses a direct read-by-key request instead of a point to a record by key. (VSAM dynamic access optional logic path)End of change
Start of changeNew runtime optionsEnd of change
Start of changePH56036 and PH56037: The following COBOL runtime options are added:
  • VSAMDYNAMICDIR: Changes the dynamic access method of VSAM to a direct read-by-key request. (VSAMDYNAMICDIR)
  • DISABLEUOPTREPORT: Suppresses the COBOL runtime options report. (DISABLEUOPTREPORT)
End of change

Debugging enhancement

You can use ddname IGZPROUT at the run step of your JCL to generate a report of all dynamically called programs that are compiled with Enterprise COBOL 5 or later. (Generating a report of dynamically called COBOL programs)

Start of change

Usability enhancement

PH56142: When compiling under z/OS UNIX, you can use the cob2 -M option to generate a make dependency file, file.u. This file contains entries for each copybook file that resides in a z/OS UNIX file system and is referenced in your COBOL source file. (cob2 syntax and options)

End of change

Compiler message changes

New messages
  • IGYCB7035-S: FPR save area offset limit(4095) exceeded (FASTLINK limitation). Offset is &1. Reduce incoming parameter size in function &2. (IGYCB7035-S)
  • IGYCB7155-U: Register \"&1\" is reserved by the compiler and cannot be used in the code. (IGYCB7155-U)
  • IGYCB7301-W: A zero base was raised to a zero power in a numeric literal exponentiation. The result was set to 1. (IGYCB7301-W)
  • IGYCB7302-W: A zero base was raised to a negative power in a numeric literal exponentiation. The result was set to 0. (IGYCB7302-W)
  • IGYCB7305-U: The COBOL-specific run time library was not available at compile time. Please add SCEERUN to the concatenation for the compile step. (IGYCB7305-U)
  • IGYCB7319-S: The target FUNCTION-POINTER or PROCEDURE-POINTER in the CALL statement on line &1 is NULL. (IGYCB7319-S)
Changed messages
  • IGYCB7314-E: The value of data item &1 at statement number &2 on line &3 was invalid. The value exceeded the number of digits in the data definition, and failed the SIZE ERROR test generated by the NUMCHECK(BIN) compiler option. (IGYCB7314-E)

Prefer video?

To get a quick overview of the major new features and enhancements in Enterprise COBOL for z/OS 6.4, watch the Video: What is new in Enterprise COBOL for z/OS 6.4.
End of change