Changes in IBM Enterprise COBOL for z/OS, Version 5 Release 1
New and changed COBOL function
- The XML GENERATE statement has been extended with new syntax that
gives the programmer more flexibility and control over the form of
the XML document that is generated:
- The NAME phrase has been added to allow user-supplied element and attribute names.
- The TYPE phrase has been added to give the user control of attribute and element generation.
- The SUPPRESS phrase has been added to allow suppression of empty attributes and elements.
- XML parsing support has been enhanced with a special register, XML-INFORMATION, to easily determine whether the XML content delivered for an XML event is complete or will be continued on the next event.
- The compatibility-mode COBOL XML parser from the COBOL library
is no longer supported for use by Enterprise COBOL V5 programs.
XML PARSE
statements in V5 programs always use the XML parser in z/OS XML System Services.
New support for UNBOUNDED tables and groups enables top-down mapping of data structures between XML and COBOL applications
- ULENGTH
- UPOS
- USUBSTR
- USUPPLEMENTERY
- UVALID
- UWIDTH
A new inline comment indicator (the character
string '*>
') can be coded to indicate that the ensuing
text on a line is a comment.
Enterprise COBOL Version 5.1 corrects READ statement processing of wrong-length records.
- DATEVAL intrinsic function
- UNDATE intrinsic function
- YEARWINDOW intrinsic function
- DATEPROC compiler option
- YEARWINDOW compiler option
To be compatible with the convention used
by C and C++, the linkage convention for returning a doubleword binary
item specified in the RETURNING
phrase PROCEDURE
DIVISION
header and the CALL
statement is
changed. If
a COBOL program returns a doubleword binary item via a PROCEDURE DIVISION
RETURNING header to a calling COBOL program with a CALL ... RETURNING
statement, an issue occurs if only one of the programs is recompiled
with Enterprise COBOL V5.
Both the called and calling programs must be recompiled with Enterprise COBOL V5 together,
so that the linkage convention for the RETURNING item is consistent.
Format
2 declarative syntax: USE...AFTER...LABEL PROCEDURE...
,
and the syntax: GO TO MORE-LABELS
are no longer supported.
Option changes
- The following compiler options are new:
AFP(VOLATILE | NOVOLATILE)
ARCH(n)
DISPSIGN(SEP | COMPAT)
HGPR(PRESERVE | NOPRESERVE)
MAXPCF(nnn)
STGOPT
|NOSTGOPT
- The following compiler options are modified:
- The
MDECK
option no longer has a dependency on theLIB
option, as the compiler behaves as though theLIB
option is always enabled. - The
MIG
suboption of theNUMPROC
compiler option is no longer supported - The compiled-in range checks cannot be disabled at
run time using the runtime option
CHECK(OFF)
. - Execution of
NORENT
programs above the 16 MB line is not supported. - The
HOOK
|NOHOOK
andSEPARATE
|NOSEPARATE
suboptions of theTEST
compiler option are no longer supported. Those suboptions continue to be tolerated to ease migration. New suboptionsSOURCE
andNOSOURCE
are added to theTEST
compiler option. - The
NOTEST
option is enhanced to include the suboptionsDWARF
andNODWARF
. - The
EXIT
compiler option is no longer mutually exclusive with theDUMP
compiler option, and the compiler exits rules are updated. - The
OPTIMIZE
option is modified to allow several level of optimization. The previousOPTIMIZE
option format is deprecated but is tolerated for compatibility. - The format and contents of listing generated from the
LIST
option are new - The format and contents of the listing output generated from the
MAP
option are changed
- The
- Support for the following compiler options has been removed:
- DATEPROC
- LIB
- SIZE(MAX)
- YEARWINDOW
- XMLPARSE
Compiler behavior changes
There have been a number of changes to Enterprise COBOL V5.1 that result in different behaviors.
AMODE 24
execution of programs compiled with Enterprise COBOL V5.1.0 is no longer supported. Enterprise COBOL V5.1.0 executable modules must beAMODE 31
.- The
IGZERRE
andILBOSTP0
interfaces for managing a reusable COBOL environment are not supported for applications containing programs compiled with Enterprise COBOL V5. - The
IGZBRDGE
macro, for converting static calls to dynamic calls, is not supported for programs compiled with Enterprise COBOL V5. - The compatibility-mode COBOL XML parser from the
COBOL library, the old parser from Enterprise COBOL V3, is no longer
supported for use by Enterprise COBOL V5
programs.
XML PARSE
statements in V5 programs always use the z/OS System Services XML parser (XMLSS). - Enterprise COBOL
Version 5 now requires Language Environment® at compilation time. If the Language Environment data sets
SCEERUN
andSCEERUN2
are not installed in the MVS™ LNKLST or LPALST, they must be included in theSTEPLIB
orJOBLIB
concatenation for the compilation. - Enterprise COBOL Version 5.1 has a new Language Environment member ID, 4. Prior versions of COBOL use ID 5.
- Enterprise COBOL Version 5 programs have some restrictions with interoperability with older versions of COBOL. For details see, Interoperability with older levels of IBM COBOL programs.
- COBOL programs with the following characteristics may behave differently
with Enterprise COBOL V5 than with prior versions:
- Programs that use unsupported COBOL language syntax.
- Programs referencing data items that, at run time, contain values
not conforming to the PICTURE clause on the data description entry.
For example:
- a fullword binary item with picture
S9(6) USAGE BINARY
, containing an oversize value of+123456789
(unless theTRUNC(BIN)
option was specified) - a two-byte PACKED-DECIMAL item with picture S99, containing an oversize value of 123 (such as, 123C in hexadecimal).
- a packed decimal or zoned decimal item containing an invalid or non-preferred sign, that does not conform to the sign requirements of the data description entry and the NUMPROC(PFD) compiler option setting in effect.
- a fullword binary item with picture
- Programs with undiagnosed subscript range errors (when the
SSRANGE
compiler option was not specified), that reference storage outside the storage allocation for the base data item. - Applications with low-level dependencies on specific generated code sequences, register conventions, or internal IBM control blocks may behave differently with Enterprise COBOL V5 than with prior versions.
- It is illegal to specify a value greater than integer-2 for the object of an OCCURS DEPENDING ON clause, and thus the behavior is undefined. However, Enterprise COBOL V5.1 behaves differently than prior versions when it occurs.
- VSAM record areas for reentrant COBOL programs are
allocated above 16 MB if
DATA(31)
is enabled. Programs that pass data in VSAM file records asCALL … USING BY REFERENCE
parameters toAMODE 24
subprograms may be impacted. Such programs can be recompiled with theDATA(24)
compiler option, or the Language EnvironmentHEAP(BELOW)
option can be used, to ensure that the records are addressable by theAMODE 24
programs. - Compile-time storage requirements are substantially increased,
compared to prior versions of Enterprise COBOL. See the discussion
of the
SIZE
option. This is particularly true at higher optimization levels, that is, programs compiled with theOPT(1)
orOPT(2)
compiler option. - Compile-time CPU time requirements are substantially increased, compared to prior versions of Enterprise COBOL.
- Compile time and run time diagnostic messages may differ, and
may be generated at different times or locations.
- Presence or absence of informational and warning level diagnostics may differ
- Diagnostics for programs that define excessive and unsupported amounts of storage may be diagnosed either by the binder at bind time, or by Language Environment at run time, instead of by the compiler at compilation time.
- Compiler listing format and contents differ from prior versions of Enterprise COBOL.
Application performance changes
The OPTIMIZE
option
has been changed to support several levels of performance optimization
for your application. The suboptions have also been changed. The previous OPTIMIZE
option
format is deprecated but is tolerated for compatibility.
OPT(0)
is equivalent to the
old NOOPTIMIZE
option in most ways, OPT(0)
removes
some unreachable code that was not previously removed with NOOPTIMIZE
. Debugging changes
When the TEST
option
is specified, DWARF debugging information is included in the application
module.
With NOLOAD debug segments in the program object, Enterprise COBOL V5 debug data always matches the executable file, and is always available without giving lists of data sets to search, and does not increase the size of the loaded program.
If you specify the TEST(SOURCE)
option,
the DWARF debug information includes the expanded source code, and
the compiler listing is not needed by IBM Debug
Tool. When the TEST(NOSOURCE)
is specified, the generated
DWARF debugging information does not include the expanded source code.
You can use the NOTEST(DWARF)
option
to include basic DWARF diagnostic information in the application module.
This enables application failure analysis tools, such as CEEDUMP
and IBM Fault Analyzer.
Packaging and JCL changes
There have been a number of changes to the packaging, installation and JCL with Enterprise COBOL V5.1.
The SIGYCOMP
data
set is now a PDSE, rather than a PDS data set as in prior versions.
- When compiling under z/OS TSO
or batch, the COBOL compiler now requires 15 utility data sets,
SYSUT1
toSYSUT15
- The
SYSMDECK
data set is now required for all compilations.SYSMDECK
may be specified as a utility (temporary) data set if theNOMDECK
option is specified. WhenMDECK(...)
is specified, theSYSMDECK DD
allocation must specify a permanent data set. - The alternate DDNAME list parameter used when the COBOL compiler is invoked from an assembly language program has been expanded with entries for the additional work data sets.
- IGYWC
- IGYWCL
- IGYWCLG
- IGYWCG
- IGYWCPG
- IGYWCPL
- IGYWCPLG
- IGYWPL
Restrictions
If you use COBOL for IMS exit routines, Enterprise COBOL V5.1 can compile programs only when the exit is an assembler program in a PDS data set that LOADs and calls a COBOL V5.1 program in a PDSE. For workarounds to handle the restriction, see Moving IMS programs to Enterprise COBOL V5 or V6.