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.
- Improved COBOL/Java interoperability
- Non-OO COBOL/Java™ interoperability support
- New
JAVAIOP
option - New
JAVA-CALLABLE
directive - New
JAVA-SHAREABLE
directive - Enhanced
CALL
statement - Enhanced cjbuild utility
- Interoperability between AMODE 31 (31-bit) and AMODE 64 (64-bit) COBOL programs
- User-defined functions support
- Function IDENTIFICATION DIVISION
- User-defined function configuration section
- Function procedure division
- New CONTENT-OF intrinsic function
- Using user-defined functions
- Function prototypes support
- Function IDENTIFICATION DIVISION
- Function procedure division
- Using function prototypes
- Enhanced UTF-8 support
- JSON enhancements
- ENCODING phrase
- Anonymous array support
- JSON null values support
- Improved integration with IBM Automatic Binary Optimizer for z/OS (ABO)
- Compiler option changes
- New:
SMARTBIN
,JAVAIOP
- Changed:
ARCH
,RULES
,TUNE
- New:
- Runtime changes
- PERFORM … UNTIL EXIT support
- VSAM dynamic access optional logic path
- New runtime options
- Debugging enhancement
- Usability enhancement
- Compiler
message changes
- New: IGYCB7035-S, IGYCB7155-U, IGYCB7301-W, IGYCB7302-W, IGYCB7305-U, IGYCB7319-S
- Changed: IGYCB7314-E
Improved COBOL/Java interoperability
- 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 theJAVA-CALLABLE
orJAVA-SHAREABLE
directives or by calling Java static methods using theCALL
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)
- You can use the
JAVA-SHAREABLE ON
andJAVA-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)
PH48453: 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)
PH49715: 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)
PH51752: 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)
ON EXCEPTION
phrase
support to deal with exceptions in the non-OO COBOL/Java
interoperability framework. (Handling errors in Java-interoperable COBOL
applications)- Enhanced cjbuild utility
- The cjbuild utility in the COBOL/Java interoperability framework is simplified and improved. A
"methods" file is not longer required. You can process all files in the COBOL artifact directory or
just specify COBOL programs directly with the new
-i/--progid
option on the cjbuild command line. (cjbuild command reference)
PH61700: The cjbuild utility is enhanced to allow users to specify the names of COBOL programs in the command line and process all files in the COBOL artifact directory. (Example: COBPROD application - building and running )
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.
- Function IDENTIFICATION DIVISION
- For a user-defined function, the first paragraph of the
IDENTIFICATION DIVISION
must be theFUNCTION-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. TheCONTENT-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)
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.
- Function IDENTIFICATION DIVISION
- For a function prototype, the first paragraph of the
IDENTIFICATION DIVISION
must be theFUNCTION-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)
Enhanced UTF-8 support
PH48667: 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)
PIC U
) data items as the arguments to
the STRING
and UNSTRING
statements. (STRING statement and UNSTRING statement)PIC U
) data items as
the arguments to the JSON GENERATE and JSON PARSE statements. (JSON GENERATE statement and JSON PARSE
statement)JSON enhancements
- PH57398: You can use the
ENCODING
phrase of theJSON GENERATE
andJSON PARSE
statements to specify the encoding of the JSON document. (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. - PH58384: You can use the NAME IS OMITTED phrase to parse an anonymous JSON array in addition to an anonymous JSON object. (JSON GENERATE statement and JSON PARSE statement)
- PH59733: You can generate and parse JSON null values by using the
JSON GENERATE
andJSON PARSE
statements. (Generating JSON null values and Handling JSON null values)
Improved integration with IBM Automatic Binary Optimizer for z/OS (ABO)
- 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.
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 theJAVA-CALLABLE
orJAVA-SHAREABLE
directives or by calling Java static methods using theCALL
statement. (JAVAIOP)
CONDCOMP
- PH50296:
CONDCOMP
compiler option is introduced to control how conditional code will be displayed in the listing. (CONDCOMP)
- Modified compiler options
-
ARCH
ARCH(8)
andARCH(9)
are no longer accepted. A new higher level ofARCH(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)
andTUNE(9)
are no longer accepted. A new higher level ofTUNE(14)
is accepted.TUNE(10)
is the default ifARCH
is not specified. (TUNE)NUMCHECK
- The
NUMCHECK
compiler option is updated to avoid generating runtime checking code of zoned-decimal senders inMOVE
statements when the receiver is an alphanumeric data item andNUMCHECK(ZON(LAX))
is in effect.
Runtime changes
- PERFORM … UNTIL EXIT support
- You can
specify
EXIT
in place of a condition in aPERFORM
statement. If theUNTIL
phrase with theEXIT
reserved word is specified, execution proceeds exactly as if the samePERFORM
statement were coded with condition-1 specified, except that condition-1 never evaluates as true. (PERFORM with UNTIL phrase) - VSAM dynamic access optional logic path
- PH56036 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) - New runtime options
- PH56036 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)
Debugging enhancement
With COBOL 6.4 at the base level, 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 releases. With the COBOL runtime PTF for APAR PH61133 installed,
the report contains COBOL 5 or later programs that are called dynamically, statically, and via DLL
linkage. (Generating a report of dynamically called COBOL programs)
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)
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)