Changes at run time with Enterprise COBOL Version 5 and Version 6
There are a number of changes to runtime behavior with Enterprise COBOL V5 and V6.
If a z/OS® system does not have Language Environment® PTFs installed to support Enterprise COBOL Version 5 or Version 6 programs, you cannot run Enterprise COBOL Version 5 or Version 6 programs on that system.
- Runtime option changes. For details, see Language Environment option changes.
- Interoperability. Enterprise COBOL V5 and V6 has some restrictions with interoperability with older versions of COBOL. For details, see Interoperability with older levels of IBM COBOL programs.
- Invalid data might get different results with COBOL V5 and V6 than in earlier
COBOL versions. Some users have found that they get different results
with the newer compilers than with previous compilers, and/or that
they get different results with different OPT or
ARCH settings. These are normally due to invalid data that is
brought into the COBOL programs at run time. One way to find out whether
your programs will have this problem is to follow our new migration
recommendation:
- Compile with SSRANGE, NUMCHECK, PARMCHECK, INITCHECK, and OPT(0), and then run regression tests.
- Check whether there are any problems:
- If no problems found, recompile with NOSSRANGE, NONUMCHECK, NOPARMCHECK, and OPT(2); then run a final test and move the application into production.
- If problems are found, then either correct the programs and or data, or in the case of bad data
in zoned decimal data items, use the
INVDATA
compiler option to tolerate the invalid data.
Both INITCHECK and NUMCHECK options are available in Enterprise COBOL V6.2, V6.1, and V5.2 with current service applied.
Note: You do not have to do this extra testing for programs that have already been compiled with Enterprise COBOL V5 or V6. -
In a rare scenario, valid data using
COMPUTE
andROUNDED
may return different results with Enterprise COBOL V5 and V6 as compared to earlier COBOL versions.In this scenario, if the last operation on a
COMPUTE
statement withROUNDED
is either addition or subtraction, and if an operand for that operation has a decimal precision that is different from the decimal precision for the intermediate result of that computation, then the operand may require shifting, and if a right-shift is performed, and results in a loss of decimal precision for the operand, then the value of that operand will be rounded before the operation is performed. In some cases, based on the data value, this can give different results between Enterprise COBOL and earlier compilers. As is always the case, we recommend regression testing to verify that the results of any computations are correct after migrating. - All of the AMODE and RMODE scenarios supported by Enterprise COBOL Version 4 are
now supported with Version 5 and Version 6,
except that programs compiled with the NORENT compiler option must
be RMODE 24. After binding, executable COBOL programs can
have any of the following combinations of AMODE and RMODE attributes:
- AMODE 31 and RMODE ANY
- Either AMODE ANY or AMODE 31, and RMODE 24
- AMODE 24 and RMODE 24
- In some cases, AMODE 24 execution is not supported and the applications must run in AMODE 31. For details, see Restrictions for AMODE.
- For applications compiled with Enterprise COBOL V5 or V6, the compiled-in
range checks cannot be disabled at run time using the runtime option
CHECK(OFF)
orNOSSRANGE
. The
ILBOABN0
interface for requesting an ABEND in a COBOL environment can be called dynamically with Enterprise COBOL V5 and later versions. When called by a program compiled with the Enterprise COBOL compiler, it will have the same result as callingCEE3ABD
using ACTION code 1.You are strongly recommended to migrate and use the
CEE3ABD
interface, because theCEE3ABD
interface provides extra flexibility to control the level of details provided in theCEEDUMP
produced.When your application is called by Enterprise COBOL programs, it might ABEND in an unexpected way if it has an older version ofILBOABN0
(before LE's SCEELKED) statically linked. To fix the unexpected ABEND, you can follow one of the suggestions below:- Migrate to
CEE3ABD
. - Relink your application with the REPLACE
ILBOABN0
in the LINK step, against LE's SCEELKED. - Change the COBOL program to use dynamic call for
ILBOABN0
.
- Migrate to
- The
IGZERRE
andILBOSTP0
interfaces for managing a reusable COBOL environment are not supported for applications containing programs compiled with Enterprise COBOL V5 or V6. - The
IGZBRDGE
macro, for converting static calls to dynamic calls, is not supported for programs compiled with Enterprise COBOL V5 or V6. - A new compiler option,
VLR(COMPAT|STANDARD)
, controls how Enterprise COBOL handles conflicts with record length in READ statements for variable-length record files. For details, see Variable length records - wrong length READ. - VSAM record areas for reentrant COBOL programs are allocated above
16 MB, by default. Programs that pass data in VSAM file records as
CALL … USING
parameters toAMODE 24
subprograms may be impacted. Such programs can be recompiled with theDATA(24)
compiler option, or the Language EnvironmentHEAP()
option can be used, to ensure that the records are addressable by theAMODE 24
programs. - CICS® System Definition (CSD) file might need to be updated to include Enterprise COBOL V5 and V6 runtime modules. For details, see CSD setup differences with Enterprise COBOL V5 and V6.
- When COBOL programs perform an IEEE (decimal or binary) floating point division-by-zero operation, the division operation raises an IEEE divide-by-zero exception. For details, see Using object oriented COBOL or interoperating with C programs.
For COBOL V5 and later, procedure and function pointers point to a function descriptor rather than directly to the entry point. If your code expects these pointers to point directly to the entry point, for example of a data-only module, this requires a code change. For details, see Using procedure and function pointers (Enterprise COBOL for z/OS Programming Guide).
For COBOL V5 and later, calls to procedure and function pointers must be from a module with an LE stack frame, which is the case for any high-level programming language. If such a call is to be made from an assembler module, an LE stack frame must be provided by using the CEEENTRY and CEETERM macros, along with the associated register content requirements.
Changes that apply to Enterprise COBOL V6 only
- In some cases, the STORAGE runtime option cannot be
used to initialize WORKING-STORAGE to a chosen value at startup. These
cases are:
- COBOL V6 programs with spanned (RECORDING MODE S) files
- Non-CICS COBOL V5 programs compiled with DATA(31)
- File status changes in V6:
- WRITE statement on line-sequential file with a record size mismatch.
In prior releases of Enterprise COBOL, when an attempt is made to write a record to a line-sequential file with mismatched record size, file status 48 is incorrectly returned. This is corrected in Enterprise COBOL V6 to return file status 44.
- OPEN INPUT on a line-sequential file when the UNIX file attribute is write-only.In prior releases of Enterprise COBOL, an OPEN statement with the INPUT phrase on a line-sequential file that has the write-only attribute, such as a z/OS UNIX file with DD PATHOPTS=(OWRONLY,...) or a COBOL program that has the write access permission only, incorrectly returned file status 0 (successful). An OPEN statement attempted on a file that does not support the open access mode should return file status 37.Note: "write-only" here does not mean the APPLY WRITE-ONLY clause that is not applicable to line-sequential files. Line-sequential files are files created in the z/OS UNIX file system.
In Enterprise COBOL V6, this OPEN statement is detected with file status 37.
- OPEN INPUT, I-O, EXTEND on VSAM file with file attributes mismatch. In prior releases of Enterprise COBOL, when an OPEN INPUT, I-O or EXTEND statement is attempted on a VSAM file that is not defined as OPTIONAL, and a file attributes mismatch is detected, file status 35 is incorrectly returned. This is corrected inEnterprise COBOL V6 to return file status 39.Note:
- Similar file attributes mismatch condition for OPEN OUTPUT, and for OPEN INPUT, I-O, and EXTEND when the VSAM file is defined as OPTIONAL, are already correctly reported as file status 39.
- Starting from Enterprise COBOL V6.3, when using the LP(64) option, the compilation process includes a component that runs in POSIX(ON) mode. This implies that there must be an OMVS Segment established in RACF® (or equivalent in RACF alternatives) for each user executing the compiler with this option.
- WRITE statement on line-sequential file with a record size mismatch.
-
Enterprise COBOL V6 introduces an optional alternate logic path 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. For details, see VSAM dynamic access optional logic path. -
The VSAM dynamic access read option VSAMDYNAMICDIR and the COBOL runtime options report disabling option DISABLEUOPTREPORT are added. For details, see VSAMDYNAMICDIR and DISABLEUOPTREPORT.