Igy 6 MG 40
Igy 6 MG 40
Igy 6 MG 40
6.4
Migration Guide
IBM
GC27-8715-03
Note
Before using this information and the product it supports, be sure to read the general information under
“Notices” on page 349.
Tables.................................................................................................................. xi
Preface................................................................................................................xv
About this information................................................................................................................................xv
Terminology clarification...................................................................................................................... xv
IBM COBOL compilers by name and version.......................................................................................xvi
Acknowledgement..............................................................................................................................xviii
Related publications.......................................................................................................................... xviii
Summary of changes to this information.................................................................................................. xix
Changes in GC27-8715-03 (August 2022).......................................................................................... xx
Changes in GC27-8715-02 (May 2021)............................................................................................... xx
Changes in GC27-8715-01 (February 2021)...................................................................................... xxi
Changes in GC27-8715-00 (February 2021).................................................................................... xxiv
Changes in GC14-7383-03 (March 2019)........................................................................................xxvii
Changes in GC14-7383-02 (March 2019).........................................................................................xxix
Changes in GC14-7383-00 (June 2013)............................................................................................xxx
Changes in GC23-8527-01 (August 2009)........................................................................................ xxx
Changes in GC23-8527-00 (December 2007)..................................................................................xxxi
Changes in GC27-1409-05 (November 2006)..................................................................................xxxi
Changes in GC27-1409-04 (March 2006).........................................................................................xxxi
Changes in GC27-1409-03 (July 2005)............................................................................................ xxxi
Changes in GC27-1409-02 (December 2003)..................................................................................xxxi
Changes in GC27-1409-01 (September 2002)................................................................................xxxii
Changes in GC27-1409-00 (November 2001).................................................................................xxxii
Changes in GC26-4764-05 (September 2000)................................................................................xxxii
Summary of changes to the COBOL compilers..................................................................................... xxxiii
Changes in IBM Enterprise COBOL for z/OS 6.4 with PTFs installed..............................................xxxiii
Changes in IBM Enterprise COBOL for z/OS 6.4..............................................................................xxxiii
Changes in IBM Enterprise COBOL for z/OS 6.3 with PTFs installed..............................................xxxiv
Changes in IBM Enterprise COBOL for z/OS 6.3..............................................................................xxxvi
Changes in IBM Enterprise COBOL for z/OS 6.2 with PTFs installed.............................................xxxvii
Changes in IBM Enterprise COBOL for z/OS 6.2..............................................................................xxxix
Changes in IBM Enterprise COBOL for z/OS 6.1 with PTFs installed................................................... xl
Changes in IBM Enterprise COBOL for z/OS 6.1.................................................................................. xli
Changes in IBM Enterprise COBOL for z/OS 5.2 with PTFs installed................................................. xlii
Changes in IBM Enterprise COBOL for z/OS 5.2................................................................................ xliii
Changes in IBM Enterprise COBOL for z/OS 5.1.1............................................................................. xliv
Changes in IBM Enterprise COBOL for z/OS 5.1................................................................................. xlv
Changes in IBM Enterprise COBOL for z/OS 4.2...............................................................................xlviii
Changes in IBM Enterprise COBOL for z/OS 4.1................................................................................ xlix
Changes in IBM Enterprise COBOL for z/OS 3.4 with PTFs installed..................................................... l
Changes in IBM Enterprise COBOL for z/OS 3.4..................................................................................... l
Changes in IBM Enterprise COBOL for z/OS 3.3.................................................................................... li
Changes in IBM Enterprise COBOL for z/OS and OS/390 3.2................................................................li
Changes in IBM Enterprise COBOL for z/OS and OS/390 3.1...............................................................lii
Changes in COBOL for OS/390 & VM 2.2..............................................................................................liii
Changes in COBOL for OS/390 & VM 2.1.2.......................................................................................... liii
Changes in COBOL for OS/390 & VM 2.1.1.......................................................................................... liv
Changes in COBOL for OS/390 & VM 2.1..............................................................................................liv
How to send your comments..................................................................................................................... liv
iii
Part 1. Overview....................................................................................................1
Part 2. Migration strategies.................................................................................. 23
Part 3. Upgrading programs................................................................................. 43
iv
Language elements that require change (quick reference)...........................................................45
Converting to 85 COBOL Standard.......................................................................................................53
COBOL Conversion Tool (CCCA)......................................................................................................53
OS/VS COBOL MIGR compiler option.............................................................................................53
Language elements that require other products for support..............................................................53
Report Writer...................................................................................................................................53
Language elements that are not implemented................................................................................... 54
ISAM file handling...........................................................................................................................55
BDAM file handling..........................................................................................................................55
Communication feature.................................................................................................................. 55
Language elements that are not supported........................................................................................ 56
SEARCH ALL statements...................................................................................................................... 61
Undocumented OS/VS COBOL extensions that are not supported.................................................... 61
Language elements that changed from OS/VS COBOL....................................................................... 69
v
Chapter 12. Upgrading programs from Enterprise COBOL 3..................................................................143
SEARCH ALL statements....................................................................................................................143
Upgrading programs that have SEARCH ALL statements............................................................143
Upgrading Enterprise COBOL 3 programs that have XML PARSE statements................................. 145
COMPAT XML parser considerations............................................................................................ 146
Upgrading Enterprise COBOL programs that have XML GENERATE statements............................. 148
Converting programs that use new reserved words......................................................................... 148
Upgrading programs that use SIMVRD support................................................................................ 149
Part 4. What is new and different with Enterprise COBOL 5 and 6?...................... 165
vi
Chapter 18. Adding Enterprise COBOL 5 or 6 programs to existing COBOL applications..................... 213
AMODE and RMODE considerations.................................................................................................. 215
vii
Free and open source COBOL Analyzer............................................................................................. 287
Notices..............................................................................................................349
Programming interface information........................................................................................................ 351
Trademarks.............................................................................................................................................. 351
Glossary............................................................................................................ 353
List of resources................................................................................................ 397
Enterprise COBOL for z/OS...................................................................................................................... 397
Related publications................................................................................................................................397
viii
Index................................................................................................................ 401
ix
x
Tables
1. COBOL compiler name, version, release, product numbers, GA and EOS dates...................................... xvi
22. QSAM and VSAM file status codes with CMPR2 and NOCMPR2........................................................... 113
xi
24. Compiler options for IBM COBOL programs.......................................................................................... 139
36. How to find the PPA4, NORENT static area, LE’s WSA, RENT static area, and program static area
in a dump?................................................................................................................................................ 178
39. Compiler options new with Enterprise COBOL 5 and 6......................................................................... 186
40. Compiler options changed with Enterprise COBOL 5 and 6.................................................................. 189
41. Compiler options not available in Enterprise COBOL 5 and 6............................................................... 192
42. Runtime option changes with Enterprise COBOL 5 and 6..................................................................... 201
44. How to find the PPA4, NORENT static area, LE’s WSA, RENT static area, and program static area
in a dump?................................................................................................................................................ 210
47. Compiler options for programs that run under CICS............................................................................. 229
xii
49. Recommended compiler options for applications with mixed COBOL programs.................................240
52. Language Environment supported calls between COBOL programs and assembler programs
under non-CICS; Yes indicates that a call is supported..........................................................................290
53. Language Environment supported calls between COBOL programs and assembler programs that
run under CICS; Yes indicates that a call is supported........................................................................... 291
xiii
xiv
Preface
Terminology clarification
In this information, we use the term Enterprise COBOL as a general reference to:
• IBM Enterprise COBOL for z/OS and OS/390® 3.1
• IBM Enterprise COBOL for z/OS and OS/390 3.2
• IBM Enterprise COBOL for z/OS 3.3
• IBM Enterprise COBOL for z/OS 3.4
• IBM Enterprise COBOL for z/OS 4.1
• IBM Enterprise COBOL for z/OS 4.2
• IBM Enterprise COBOL for z/OS 5.1
• IBM Enterprise COBOL for z/OS 5.2
• Enterprise COBOL Value Unit Edition for z/OS 5.2
• IBM Enterprise COBOL for z/OS 6.1
• IBM Enterprise COBOL Value Unit Edition for z/OS 6.1
• IBM Enterprise COBOL for z/OS 6.2
• IBM Enterprise COBOL Value Unit Edition for z/OS 6.2
• IBM Enterprise COBOL for z/OS 6.3
• IBM Enterprise COBOL Value Unit Edition for z/OS 6.3
• IBM Enterprise COBOL for z/OS 6.4
• IBM Enterprise COBOL Value Unit Edition for z/OS 6.4
Note: Enterprise COBOL Value Unit Edition for z/OS is the same as Enterprise COBOL for z/OS made
available under a different product number and pricing metric.
In this information, we use the term IBM COBOL as a general reference to:
• COBOL/370 1.1
• COBOL for MVS™ & VM 1.2
• COBOL for OS/390 & VM 2.1
• COBOL for OS/390 & VM 2.2
See “Summary of changes to the COBOL compilers” on page xxxiii for further details.
xvi Preface
Table 1. COBOL compiler name, version, release, product numbers, GA and EOS dates (continued)
Version, release, General availability End of support
and modification (GA) date (EOS) date
level Product
(Year-Month-Day) (Year-Month-Day)
Compiler number
5.2 5697-ECV 2015-10-06 2020-04-30
Enterprise COBOL
Value Unit Edition
for z/OS1
Note:
1. Enterprise COBOL Value Unit Edition for z/OS is the same as Enterprise COBOL for z/OS made
available under a different product number and pricing metric.
To check lifecycle details (lifecycle dates, announcement letters, and other information) for Enterprise
COBOL for z/OS products, visit the lifecycle website at https://www.ibm.com/support/lifecycle/details?
q45=R109684Z50598F65.
To aid in moving your runtime library to Language Environment, you can find information on how to
run existing VS COBOL II and OS/VS COBOL load modules under Language Environment, including
link-edit requirements for support and recommended runtime options for compatible behavior in the
Enterprise COBOL 4.2 Compiler and Runtime Migration Guide at http://publibfp.dhe.ibm.com/epubs/pdf/
igy3mg50.pdf.
Preface xvii
To aid in moving from your older COBOL compiler to Enterprise COBOL, this information provides
descriptions of the language differences between older COBOL compilers and Enterprise COBOL and
describes the IBM conversion tools available to aid in converting your source programs to Enterprise
COBOL programs. It also describes other differences that might require changes in your application
development process in order to use Enterprise COBOL.
The following products or deliverables are also available to aid you in assessing the effort of moving from
your older COBOL compiler to Enterprise COBOL:
• IBM Enterprise COBOL for z/OS Migration Assistant.
You can use the COBOL Migration Assistant to navigate through the compiler migration process from
Enterprise COBOL 4 or earlier versions to Enterprise COBOL 5 or 6.
• IBM Enterprise COBOL for z/OS Migration Portal.
Check case studies, COBOL experts interview videos, the cloud-based COBOL Migration Assistant,
no-charge COBOL Migration and Performance Tuning Webinars, FAQs, other IBM products to support
your migration, and many other resources to help ease your migration efforts from Enterprise COBOL 4
or earlier versions to Enterprise COBOL 5 or 6.
Acknowledgement
IBM would like to acknowledge the assistance of the GUIDE COBOL Migration Task Force in the
preparation of the OS/VS COBOL to VS COBOL II Migration Guide. The task force provided ideas,
experience-derived information, and perceptive comments on the subject of OS/VS COBOL to VS COBOL
II conversion.
The information received from this previous conversion experience, as well as input from many
experienced OS/VS COBOL and VS COBOL II IBM customers, aided in the development of this Migration
Guide. Without such assistance, this information would have been much more difficult to develop.
Related publications
The information provided with Enterprise COBOL and Language Environment is designed to help you
install and customize Enterprise COBOL and create COBOL applications for z/OS.
xviii Preface
Table 2. The Enterprise COBOL for z/OS publications (continued)
Task Information
Prepare and test your programs and get details about compiler options Enterprise COBOL for z/OS
Programming Guide
Get details about COBOL syntax and specifications of language elements Enterprise COBOL for z/OS Language
Reference
Know key performance benefits and tuning considerations when using Enterprise COBOL for z/OS
Enterprise COBOL for z/OS Performance Tuning Guide
Understand COBOL compiler messages and return codes to diagnose Enterprise COBOL for z/OS Messages
problems and Codes
Get an overview of new functions in the latest COBOL compiler Enterprise COBOL for z/OS What's
New
Preface xix
Changes in GC27-8715-03 (August 2022)
xx Preface
• Updated the references to PPA4 layout and WORKING-STORAGE location in “WORKING-STORAGE
SECTION changes” on page 176.
• Clarified the background of IBM Report Writer, and added support details and version requirement in
“COBOL Report Writer Precompiler” on page 286.
Preface xxi
Changes in GC27-8715-01 (December 2020)
• Clarified that TRAP(ON) must be in effect when messages IGZ0268W and IGZ0269W have been issued
in “Taking an inventory of your applications” on page 30.
xxii Preface
• Added a support page link where lists the Enterprise COBOL 4 PTFs to support the migration to
Enterprise COBOL 5 or 6. For details, see Chapter 14, “Upgrading from Enterprise COBOL 4,” on page
155.
Preface xxiii
Changes in GC27-8715-01 (September 2017)
• Added information about Enterprise COBOL 6.2 changes to the chapter Chapter 16, “Changes with
Enterprise COBOL 6,” on page 167, and the changes mainly fall into the following topics:
– Prerequisite software level changes
– COBOL source code differences
– Compiler option changes
– Listing changes
• Updated information about the z/OS MEMLIMIT changes in Enterprise COBOL 6. (“Changes in compiling
with Enterprise COBOL 5 and 6” on page 194)
• Updated information about how to locate the WORKING-STORAGE SECTION. (“WORKING-STORAGE
SECTION changes” on page 176)
xxiv Preface
• Provided details about migrating from PDS data sets to PDSE data sets in Chapter 3, “Compiler upgrade
checklist,” on page 25.
• Clarified that programs compiled with TEST(...,NOSEPARATE) under CICS require read access to
DFHRPL libraries in “DFHRPL setup differences with Enterprise COBOL 5 and 6” on page 227.
• Added a link to the COBOL Migration Information Portal, where you can find information about COBOL
migration all in one place. For details, see “IBM COBOL compilers by name and version” on page xvi.
• Updated "IBM Developer for z Systems" to "IBM Developer for z/OS" in Appendix N, “Accessibility
features for Enterprise COBOL for z/OS,” on page 347.
Preface xxv
Changes in GC27-8715-00 (March 2018)
• Removed OMVS segment requirements from "“Prerequisite software and service for Enterprise COBOL
5 and 6” on page 181".
xxvi Preface
Changes in GC27-8715-00 (September 2016)
• Added information to highlight the Enterprise COBOL 6 changes in "Chapter 16, “Changes with
Enterprise COBOL 6,” on page 167".
• Added information about a new INITCHECK compiler option that controls whether to check for
uninitialized data items and issue warning messages when they are used without being initialized. The
INITCHECK option is introduced in Enterprise COBOL 6.1 with PTF for APAR PI68226 installed.
Preface xxvii
Changes in GC14-7383-03 (May 2018)
• Updated information in “CSD setup differences with Enterprise COBOL 5 and 6” on page 227 because
certain CICS TS versions provide the system autoinstall capability for LE programs and CICS will create
the program definition automatically when the programs are first loaded.
• Clarified that the separate CICS translator is still shipped with current CICS products but is no longer
being enhanced in “Migrating from the separate CICS translator to the integrated translator” on page
230.
xxviii Preface
Changes in GC14-7383-03 (September 2016)
• Added information about a new INITCHECK compiler option that controls whether to check for
uninitialized data items and issue warning messages when they are used without being initialized. The
INITCHECK option is introduced in Enterprise COBOL 5.2 with PTF for APAR PI69197 installed.
Preface xxix
Changes in GC14-7383-02 (April 2017)
• Updated information about calling a ILBOABN0 callable service with Enterprise COBOL 5 and later
versions in “Changes at run time with Enterprise COBOL 5 and 6” on page 198.
Compiler
• Added information about integrated Db2 coprocessor
• Updated information about migrating from XMLPARSE(COMPAT) to XMLPARSE(XMLSS), for example,
changes in the handling of several XML events
• Updated information about the differences in parsing behavior when you compile using
XMLPARSE(XMLSS)
• Added new reserved words
• Added new compiler options
• Added information to appendix on commonly asked questions and answers:
– Information about COBOL program calls
– Information about running existing COBOL applications with Java™ 5 or Java 6
Run time
• Updated information about region-wide defaults
xxx Preface
• Updated information about TEST option
• Updated information about Language Environment STORAGE(00) option
Information about CICS has been corrected.
Miscellaneous maintenance and editorial changes have been made; for example, Appendix B, “COBOL
reserved word comparison,” on page 255 and Appendix F, “Compiler limit comparison,” on page 319 have
been updated.
Run time
• Added information about removal of SIMVRD runtime option support for Enterprise COBOL 4.1
programs.
Preface xxxi
Changes in GC27-1409-01 (September 2002)
Compiler
• Added information about the use of the SEPARATE suboption with the TEST(. . .,SYM,. . .) compiler
option.
Run time
• Clarified the information about file handling for COBOL programs with RECORDING MODE U under
OS/390 2.10.
• Added information about the change in the amount of space that is used for an output file that is
defined as RECFM=U under OS/390 2.10.
• Added information about dynamic calls to assembler programs under Language Environment for z/OS
1.2 and later.
Run time
• Added information about the change in behavior for DATA(31) programs
• Added information about CEEDUMP absent from applications with assembler programs that use the
DUMP macro
• Added information about the change in file handling for COBOL programs with RECORDING MODE U
• Added information about calling between assembler and COBOL
Run time
• Added description of the new default for runtime option ABTERMENC (ABEND for Language
Environment for OS/390 2.9 and later) and the new suboptions for TERMTHDACT available in Language
Environment for OS/390 2.7 and later
• Added information about Language Environment region-wide runtime options
• Updated the virtual storage requirements
• Updated the CICS considerations:
– Performance
xxxii Preface
– SORT interface change
– DISPLAY statement
• Updated information about upgrading Language Environment release levels
Miscellaneous maintenance and editorial changes have been made.
Changes in IBM Enterprise COBOL for z/OS 6.4 with PTFs installed
Changed statements
• PH48667: A problem is fixed for using figurative constant HIGH-VALUES with fixed byte-length UTF-8
data items of a length not a multiple of 4 bytes.
Preface xxxiii
User-defined function 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.
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 binary metadata that is
designed to allow modules compiled with COBOL 6.4 to be easily optimized in the future by ABO.
• 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.
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.
Changes in IBM Enterprise COBOL for z/OS 6.3 with PTFs installed
Changed statements
• Runtime APARs PH20569(z/OS 2.2) and PH21261(z/OS 2.3/2.4): A new runtime option (IGZCOMPAT)
for MERGE statement is introduced to obtain support for DFSORT option NOBLKSET and the
conventional merge method for Enterprise COBOL 5 or later versions. (“Using DFSORT option
NOBLKSET” on page 205)
• PH18641: A new "NAME is OMITTED" phrase is added to the JSON GENERATE statement to allow
generation of an anonymous JSON object, whose top-level parent name is not generated.
• PH20724: The use of passing a file-name to a subprogram with the USING phrase of the CALL
statement is restored. (“Use of file-name in CALL ... USING statement” on page 174)
• PH26789: A new "CONVERTING" phrase is added to the JSON GENERATE and JSON PARSE statements
so that you can generate and parse JSON boolean values.
Note: COBOL Runtime LE APAR PH26698 must also be applied on all systems where programs that
make use of this new feature are linked or run.
• PH30975: New "when-phrase" and "generic-suppression-phrase" are added to the JSON GENERATE
statement so that you can conditionally suppress data items during JSON GENERATE.
Note: COBOL Runtime LE APAR PH31172 must also be applied on all systems where programs that
make use of this new feature are linked or run.
xxxiv Preface
Changed intrinsic functions
• PH20997: The UUID4 intrinsic function is introduced.
Note: COBOL Runtime LE PTF UI66560(z/OS 2.2)/UI66555(z/OS 2.3)/UI66557(z/OS 2.4) must also be
applied on all systems where programs that make use of this new feature are linked or run.
• PH31047: New date and time intrinsic functions are introduced that support encoding and decoding of
date and time information to and from formats specified in ISO 8601, and that support encoding and
decoding date and time information to and from integers that are suitable for arithmetic.
Note: COBOL Runtime LE APAR PH31133 must also be applied on all systems where programs that
make use of these new date and time intrinsic functions are linked or run.
The following intrinsic functions are added as part of the 2002 COBOL Standard:
– TEST-DATE-YYYYMMDD: The TEST-DATE-YYYYMMDD function tests whether a date in standard date
form (YYYYMMDD) is a valid date in the Gregorian calendar.
– TEST-DAY-YYYYDDD: The TEST-DAY-YYYYDDD function tests whether a date in Julian date form
(YYYYDDD) is a valid date in the Gregorian calendar.
The following intrinsic functions are added as part of the 2014 COBOL Standard:
– COMBINED-DATETIME: The COMBINED-DATETIME function combines a date in integer date form
and a time in standard numeric time form into a single numeric item from which both date and time
components can be derived.
– FORMATTED-CURRENT-DATE: The FORMATTED-CURRENT-DATE function returns a character string
that represents the current date and time provided by the system on which the function is evaluated.
– FORMATTED-DATE: The FORMATTED-DATE function converts a date from its integer date form to the
requested format.
– FORMATTED-DATETIME: The FORMATTED-DATETIME function uses a combined time and date
format to convert and combine a date in the integer date form and a numeric time expressed as
seconds past midnight to a formatted date and time representation according to that combined date
and time format.
– FORMATTED-TIME: The FORMATTED-TIME function uses a format to convert a value that represents
seconds past midnight to a formatted time of day in the requested format.
– INTEGER-OF-FORMATTED-DATE: The INTEGER-OF-FORMATTED-DATE function converts a date that
is in a specified format to an integer date form.
– SECONDS-FROM-FORMATTED-TIME: The SECONDS-FROM-FORMATTED-TIME function converts a
time that is in a specified format to a numeric value that represents the number of seconds after
midnight.
– SECONDS-PAST-MIDNIGHT: The SECONDS-PAST-MIDNIGHT function returns a value in standard
numeric time form that represents the current local time of day provided by the system on which the
function is evaluated.
– TEST-FORMATTED-DATETIME: The TEST-FORMATTED-DATETIME function tests whether a data item
that represents a date, a time, or a combined date and time is valid according to the specified format.
• PH34885: The UUID4 randomness and UUID4 intrinsic function requires significant CPU usage.
Preface xxxv
• PH29542: NUMCHECK(BIN): New suboptions TRUNCBIN | NOTRUNCBIN are added to the
NUMCHECK(BIN) option to control whether the compiler will generate the checking code for binary
data items.
• PTF UI71591 (no APAR number): New functionality is added to NUMCHECK to check alphanumeric
senders whose contents are being moved to a numeric receiver. For alphanumeric senders whose
contents are being moved to a numeric receiver, the compiler treats the sender as a numeric integer so
NUMCHECK generates an implicit numeric class test for each alphanumeric sender.
• Runtime APARs PH29755(z/OS 2.3/2.4) and PH30338(z/OS 2.3/2.4 AMODE 64): TEST: New support is
added for LLA/VLF managed programs where DWARF diagnostic information is included.
• PH33122: RULES: New suboptions LAXREDEF | NOLAXREDEF are added to the RULES option to
inform users of redefined items with mismatched lengths.
• PH34804: TUNE: The new TUNE option specifies the architecture for which the executable program will
be optimized.
• PH35643: SOURCE: New suboptions DEC | HEX are added to the SOURCE option to control whether
the generated sequence numbers for the listing of the source are in decimal or hexadecimal format.
• PH35652: OFFSET: The behaviour of OFFSET is improved. If multiple blocks of instructions are for a
single line of COBOL code, there will be multiple entries in the offset table for a given COBOL statement.
• PH37328: INVDATA: The new INVDATA compiler option replaces the deprecated ZONEDATA compiler
option and provides users fine-grained control over how the compiler generates code to handle USAGE
DISPLAY and USAGE PACKED-DECIMAL data items that contain invalid data.
• PH40356: NUMCHECK(ZON): LAXREDEF|STRICTREDEF is deprecated but is tolerated for compatibility,
and it is replaced by the LAX|STRICT option.
Migration assistance
• Runtime APAR PH25917: A new option QSAMBUFFINITCHAR is added to the IGZUOPT module that
allows you to control the initial character used for QSAM buffer initialization. (Appendix M, “Controlling
initialization of QSAM buffer (IGZ4OPT),” on page 345)
AMODE 64 support
You can use Enterprise COBOL to develop AMODE 31 (31-bit) or AMODE 64 (64-bit) applications. Adapt
your code as appropriate for your applications to support the 64-bit environment.
xxxvi Preface
Language element changes
• A DYNAMIC LENGTH clause is supported to specify a dynamic-length elementary item. A dynamic-
length elementary item is a data item whose length might change at run time. This is part of the 2014
COBOL Standard.
• A UTF-8 phrase is added to the USAGE clause to indicate a new UTF-8 data type. A picture symbol 'U'
that indicates UTF-8 character data is also added. The new USAGE indicates a new class of data (UTF-8)
and a new category of data (UTF-8).
• A POINTER-32 phrase is added to the USAGE clause, which can be used to define pointer data items
or data-pointers. The POINTER-32 data item is a 4-byte elementary data item regardless of the LP,
compiler option setting, and can be used in both LP(32) and LP(64).
• The REPOSITORY paragraph FUNCTION specifier INTRINSIC allows declaration of intrinsic function
names that may be used without specifying the word FUNCTION. This is part of the 2002 COBOL
Standard.
Listing changes
Listing terminologies change as follows:
• Static map is changed to initial heap storage map.
• Writeable static area (WSA) is changed to storage.
• WSA24 is changed to below the line storage.
• Automatic map is changed to stack storage map.
Changes in IBM Enterprise COBOL for z/OS 6.2 with PTFs installed
Preface xxxvii
– PI91586: RULES: New suboptions UNREF | NOUNREFALL | NOUNREFSOURCE are added to the
RULES option to control whether the compiler will report 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).
– PI96135: NUMCHECK(PAC): For packed decimal (COMP-3) data items that have an even number of
digits, the unused bits are checked for zeros.
– PI98480: NUMCHECK(ZON): New suboptions ALPHNUM | NOALPHNUM are added to the
NUMCHECK(ZON) option to control whether the compiler will generate code for an implicit numeric
class test for zoned decimal data items that are being compared with an alphanumeric data item,
alphanumeric literal or alphanumeric figurative constant.
– PH04369: RULES(NOEVENPACK) will not issue messages for even-digit PACKED-DECIMAL data
items whose names start with DFH, DSN, EYU or SQL, that is, data items generated for/by CICS
and Db2.
– PH04485: TEST: New suboptions DSNAME | NODSNAME are added to the TEST|
NOTEST(SEPARATE) option to control whether the external file name, which is the SYSDEBUG
dataset name used during compilation, will or will not be stored in the object program.
– PH08642: NUMCHECK: Redundant checks previously added by the NUMCHECK option have been
removed, improving performance, and some checks can be done at compile time. Specifying
NUMCHECK may also cause the compiler to produce some messages at compile time instead of at
runtime.
– PH09225: INITCHECK: The INITCHECK option can be specified with OPTIMIZE(0).
– PH11667: NUMCHECK(BIN): NUMCHECK(BIN) will check for binary data items (COMP, COMP-4, and
USAGE BINARY) even when TRUNC(BIN) is in effect.
– PH24340: NUMCHECK(ZON): New suboptions LAXREDEF | STRICTREDEF are added to the
NUMCHECK(ZON) option to control whether the compiler will check and issue warning messages
for redefined items.
– PH24413: INITCHECK: New suboptions LAX | STRICT are added to the INITCHECK option to
control whether the compiler will issue warning messages for data items unless they are initialized on
at least one, or on all, logical paths to a statement.
– PH26794: NUMCHECK(BIN): New suboptions TRUNCBIN | NOTRUNCBIN are added to the
NUMCHECK(BIN) option to control whether the compiler will generate the checking code for binary
data items.
– Runtime APAR PH20569(z/OS 2.2/2.3/2.4): The included DWARF diagnostic information when
TEST(NOSEPARATE) is effect can be extracted from the LLA/VLF managed programs.
• The following compiler option is deprecated:
– PH7328: ZONEDATA: This compiler option is deprecated but tolerated and is automatically mapped
to an equivalent form of the new INVDATA compiler option.
xxxviii Preface
Note that COBOL Runtime LE APAR PH26698 must also be applied on all systems where programs that
make use of this new feature are linked or run.
Migration assistance
• Runtime APAR PH25917: A new option QSAMBUFFINITCHAR is added to the IGZUOPT module that
allows you to control the initial character used for QSAM buffer initialization. (Appendix M, “Controlling
initialization of QSAM buffer (IGZ4OPT),” on page 345)
Preface xxxix
– TEST: 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).
• The following compiler option is removed:
– ZONECHECK is deprecated but is tolerated for compatibility, and it is replaced by NUMCHECK(ZON).
New statements
• The new JSON PARSE statement converts JSON text to COBOL data formats.
New directives
• The following new compiler directives are added to support conditional compilation as defined in the
2002 COBOL Standard:
– The DEFINE directive defines or undefines a compilation variable.
– The EVALUATE directive provides a multi-branch method of choosing the source lines to include in a
compilation group.
– The IF directive provides for a one-way or two-way conditional compilation.
• The new INLINE directive allows the compiler to decide whether to inline procedures referenced by
PERFORM statements in the source program.
Debugging changes
• TEST(SEPARATE) supports generating the debug information into side files to control module size while
retaining debugging capability.
Listing changes
• Compiler diagnostic messages now appear at the end of the listing, as was the case in COBOL compilers
before Enterprise COBOL 5.
• Addition of MD5 signature to program objects and debug data to allow matching of debug data with
executables even if a program is recompiled.
• Three new fields are added at the end of PPA4:
– Offset of the first user-defined data item in WORKING-STORAGE.
– Total length of user-defined data items in WORKING-STORAGE.
– Bit to indicate whether there are EXTERNAL data items.
Changes in IBM Enterprise COBOL for z/OS 6.1 with PTFs installed
xl Preface
– PI78089: PARMCHECK
– PI77981: INLINE
– PI96231: COPYLOC
• The following compiler options are modified:
– PI68023 and PI81838: NOSTGOPT: The default behaviour of the NOSTGOPT compiler option has been
changed.
– PI74933: SSRANGE: New suboptions MSG and ABD are added to the SSRANGE compiler option to
control how the compiler checks reference modification lengths.
– PI98996: NUMCHECK(PAC): For packed decimal (COMP-3) data items that have an even number of
digits, the unused bits are checked for zeros.
– PH01251: NUMCHECK(ZON): New suboptions ALPHNUM | NOALPHNUM are added to the
NUMCHECK(ZON) option to control whether the compiler will generate code for an implicit numeric
class test for zoned decimal data items that are being compared with an alphanumeric data item,
alphanumeric literal or alphanumeric figurative constant.
– PH13943: NUMCHECK(BIN): NUMCHECK(BIN) will check for binary data items (COMP, COMP-4, and
USAGE BINARY) even when TRUNC(BIN) is in effect.
– PH24414: INITCHECK: New suboptions LAX | STRICT are added to the INITCHECK option to
control whether the compiler will issue warning messages for data items unless they are initialized on
at least one, or on all, logical paths to a statement.
– Runtime APAR PH20569(z/OS 2.2/2.3/2.4): The included DWARF diagnostic information when
TEST(NOSEPARATE) is effect can be extracted from the LLA/VLF managed programs.
• The following compiler option is removed:
– PI71625: ZONECHECK is deprecated but is tolerated for compatibility, and it is replaced by
NUMCHECK(ZON).
Migration assistance
• Runtime APAR PH25917: A new option QSAMBUFFINITCHAR is added to the IGZUOPT module that
allows you to control the initial character used for QSAM buffer initialization. (Appendix M, “Controlling
initialization of QSAM buffer (IGZ4OPT),” on page 345)
Preface xli
• The following compiler options are modified:
– LANGUAGE
– SSRANGE
Removed options
The LVLINFO installation option is 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.
Debugging changes
The allocation and management of WORKING-STORAGE SECTION have been changed since Enterprise
COBOL 5. This does not affect the execution of the COBOL program. Tools or programs that need to locate
the starting address of the WORKING-STORAGE SECTION might be affected.
JCL changes
To specify the language of compiler messages, you must use the LANGUAGE compiler option and also set
the Language Environment runtime option NATLANG at compile time. We recommend using CEEOPTS DD
in the compile JCL.
Changes in IBM Enterprise COBOL for z/OS 5.2 with PTFs installed
xlii Preface
– PI85868: VSAMOPENFS
• The following compiler options are modified:
– PI40853: ZONEDATA: New suboption of NOPFD is added to the ZONEDATA compiler option.
ZONEDATA=NOPFD lets the compiler generate code that performs comparisons of zoned decimal
data in the same manner as COBOL 4 does when using NUMPROC=NOPFD|PFD with COBOL 4.
– PI53044: SSRANGE: New suboptions ZLEN and NOZLEN are added to the SSRANGE compiler option to
control how the compiler checks reference modification lengths.
– PI86343: SSRANGE: New suboptions MSG and ABD are added to the SSRANGE compiler option to
control how the compiler checks reference modification lengths.
– PI90458: ZONEDATA: The ZONEDATA option is updated to affect the behavior of MOVE statements,
comparisons, and computations for USAGE DISPLAY or PACKED-DECIMAL data items that could
contain invalid digits, an invalid sign code, or invalid zone bits.
– PI97835: NUMCHECK(PAC): For packed decimal (COMP-3) data items that have an even number of
digits, the unused bits are checked for zeros.
– PH01241: NUMCHECK(ZON): New suboptions ALPHNUM | NOALPHNUM are added to the
NUMCHECK(ZON) option to control whether the compiler will generate code for an implicit numeric
class test for zoned decimal data items that are being compared with an alphanumeric data item,
alphanumeric literal or alphanumeric figurative constant.
• The following compiler option is removed:
– PI81006: ZONECHECK is deprecated and can no longer be specified in IGYCDOPT. NUMCHECK=(ZON)
gives the same results as ZONECHECK used to.
Preface xliii
to the Enterprise COBOL 5 compiler for programs with XML PARSE statements that were compiled with
Enterprise COBOL 3, or with COBOL 4 compiler with the XMLPARSE(COMPAT) compiler option.
• Enterprise COBOL applications that use object-oriented syntax for Java interoperability are now
supported with Java 6, Java 7 and Java 8. Java SDK 1.4.2 and Java 5 are no longer supported.
xliv Preface
Changes in IBM Enterprise COBOL for z/OS 5.1
Option changes
• The following compiler options are new:
Preface xlv
– 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 the LIB option, as the compiler behaves as though
the LIB option is always enabled.
– The MIG suboption of the NUMPROC 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 and SEPARATE | NOSEPARATE suboptions of the TEST compiler option are no
longer supported. Those suboptions continue to be tolerated to ease migration. New suboptions
SOURCE and NOSOURCE are added to the TEST compiler option.
– The NOTEST option is enhanced to include the suboptions DWARF and NODWARF.
– The EXIT compiler option is no longer mutually exclusive with the DUMP compiler option, and the
compiler exits rules are updated.
– The OPTIMIZE option is modified to allow several level of optimization. The previous OPTIMIZE
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
• Support for the following compiler options has been removed:
– DATEPROC
– LIB
– SIZE(MAX)
– YEARWINDOW
– XMLPARSE
xlvi Preface
• Enterprise COBOL 5 programs have some restrictions with interoperability with older versions of
COBOL. For details see, “Interoperability with older levels of IBM COBOL programs” on page 21.
• COBOL programs with the following characteristics may behave differently with Enterprise COBOL 5
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 the TRUNC(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.
– 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 5 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 5.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 as CALL … USING BY REFERENCE parameters to AMODE
24 subprograms may be impacted. Such programs can be recompiled with the DATA(24) compiler
option, or the Language Environment HEAP(BELOW) option can be used, to ensure that the records are
addressable by the AMODE 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 the OPT(1) or OPT(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.
Debugging changes
When the TEST option is specified, DWARF debugging information is included in the application module.
Preface xlvii
With NOLOAD debug segments in the program object, Enterprise COBOL 5 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.
Restrictions
If you use COBOL for IMS exit routines, Enterprise COBOL 5.1 can compile programs only when the exit
is an assembler program in a PDS data set that LOADs and calls a COBOL 5.1 program in a PDSE. For
workarounds to handle the restriction, see Chapter 22, “Moving IMS programs to Enterprise COBOL 5 or
6,” on page 239.
xlviii Preface
– Character processing is enhanced for any XML document that contains a reference to a character that
is not included in the single-byte EBCDIC code page of the document.
• A facility for customizing compiler messages (changing their severity or suppressing them), including
FIPS (FLAGSTD) messages, is made possible by a new suboption, MSGEXIT, of the EXIT compiler
option.
• A new compiler option, BLOCK0, activates an implicit BLOCK CONTAINS 0 clause for all eligible QSAM
files in your program.
• The underscore character (_) is now supported in user-defined words such as data-names and
program-names. Underscores are also supported in the literal form of program-names.
• If you use the integrated CICS translator, the compiler listing will now show the CICS options that are in
effect.
• Enterprise COBOL applications that use object-oriented syntax for Java interoperability are now
supported with Java 5 and Java 6 in addition to the Java SDK 1.4.2.
Preface xlix
• Db2 support has been enhanced in this release, including DB2® 9 exploitation and improvements in
coprocessor integration and usability:
– Support for new SQL data types and new SQL syntax provided by DB2 9
– Db2 precompiler options are shown in the compiler listing (DB2 9 only)
– SQLCA and SQLDA control blocks are expanded in the compiler listing (all Db2 releases)
– A new compiler option SQLCCSID is provided to coordinate the coded character set id (CCSID)
between COBOL and Db2
• Support for DFSMS large-format data sets
• Debugging enhancements:
– Debug Tool 8 enablement, new debugging commands
– GOTO/JUMPTO in optimized code, new TEST suboption EJPD
• Compiler options can be specified in a data set (OPTFILE option)
• Cross-reference of COPY statements, libraries, and data sets in compiler listing
Changes in IBM Enterprise COBOL for z/OS 3.4 with PTFs installed
• PK31411: A new compiler option, SQLCCSID, which works in conjunction with the Db2 coprocessor,
determines whether the CODEPAGE compiler option influences the processing of SQL statements in
COBOL programs. SQLCCSID was added via APAR PK31411.
• PK16765: Corrections to the behavior of the SEARCH ALL statement have been made.
With current service applied, specifically the PTF for APAR PK16765, new compiler diagnostic
messages and runtime diagnostic messages have been added to assist in identifying programs
and SEARCH ALL statements that are potentially impacted by these corrections and may require
modification in order to migrate to COBOL 3.4. If you have this PTF on your compiler, the listing header
and object program will show Version 3 Release 4 Modification 1.
l Preface
– Edited data with USAGE NATIONAL is supported in the same language constructs as any existing
edited type, including editing and de-editing operations associated with moves.
– Group items that contain all national data can be defined with the GROUP-USAGE NATIONAL clause,
which results in the group behaving as an elementary item in most language constructs. This support
facilitates use of national groups in statements such as STRING, UNSTRING, and INSPECT.
– The XML GENERATE statement supports national groups as receiving data items, and national-edited,
numeric-edited of USAGE NATIONAL, national decimal, national floating-point, and national group
items as sending data items.
– The NUMVAL and NUMVAL-C intrinsic functions can take a national literal or national data item as an
argument.
Using these new national data capabilities, it is now practical to develop COBOL programs that
exclusively use Unicode for all application data.
• The REDEFINES clause has been enhanced such that for data items that are not level 01, the subject of
the entry can be larger than the data item being redefined.
• A new compiler option, MDECK, causes the output from library-processing statements to be written to a
file .
• Db2 coprocessor support has been enhanced: XREF is improved.
• The literal in a VALUE clause for a data item of class national can be alphanumeric .
These terminology changes were also made in this release:
• The term alphanumeric group is introduced to refer specifically to groups other than national groups.
• The term group means both alphanumeric groups and national groups except when used in a context
that obviously refers to only an alphanumeric group or only a national group.
• The term external decimal refers to both zoned decimal items and national decimal items.
• The term alphanumeric floating point is introduced to refer to an external floating-point item that has
USAGE DISPLAY.
• The term external floating point refers to both alphanumeric floating-point items and national floating-
point items.
Preface li
– Playback support lets you record and replay application execution paths and data values.
– Automonitor support displays the values of variables that are referenced in the current statement
during debugging.
– Programs that have been compiled with the OPTIMIZE and TEST(NONE,SYM,. . .) options are
supported for debugging.
– The Debug Tool GOTO command is enabled for programs that have been compiled with the
NOOPTIMIZE option and TEST option with any of its suboptions. (In earlier releases, the GOTO
command was not supported for programs compiled with TEST(NONE, . . .).)
For further details about these enhancements to debugging support, see the Debug Tool User's Guide.
• Extending Java interoperability to IMS : Object-oriented COBOL programs can run in an IMS Java
dependent region. The object-oriented COBOL and Java languages can be mixed in a single application.
• Enhanced support for Java interoperability:
– The OPTIMIZE compiler option is fully supported for programs that contain OO syntax for Java
interoperability.
– Object references of type jobjectArray are supported for interoperation between COBOL and Java.
– OO applications that begin with a COBOL main factory method can be invoked with the java
command.
– A new environment variable, COBJVMINITOPTIONS, is provided for initializing the Java virtual
machine for OO applications that start with a COBOL program.
– OO applications that begin with a COBOL program can, with some limitations, be bound as modules in
a PDSE and run using batch JCL.
• Unicode enhancement for working with Db2: The code pages for host variables are handled implicitly
when you use the Db2 integrated coprocessor. SQL DECLARE statements are necessary only for
variables described with USAGE DISPLAY or USAGE DISPLAY-1 when COBOL and Db2 code pages do
not match.
lii Preface
• VALUE clauses for BINARY data items that permit numeric literals to have a value of magnitude up to
the capacity of the native binary representation, rather than being limited to the value implied by the
number of 9s in the PICTURE clause
• A 4-byte FUNCTION-POINTER data item that can contain the address of a COBOL or non-COBOL entry
point, providing easier interoperability with C function pointers
• The following support is no longer provided (as documented in this Migration Guide):
– SOM-based object-oriented syntax and services
– Compiler options CMPR2, ANALYZE, FLAGMIG, TYPECHK, and IDLGEN
• Changed default values for the following compiler options: DBCS, FLAG(I,I), RENT, and XREF(FULL).
Preface liii
Changes in COBOL for OS/390 & VM 2.1.1
• Extensions to currency support for displaying financial data, including:
– Support for currency signs of more than one character
– Support for more than one type of currency sign in the same program
– Support for the euro currency sign, as defined by the Economic and Monetary Union (EMU)
liv Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Part 1. Overview
Record format . . . . U
Record length . . . .
Block size . . . . .
Data set name type LIBRARY
Data set version . : 2
This manual assumes that you have completed your runtime migration to Language Environment. What
does this mean? Briefly these are the conditions to be met before a COBOL runtime migration is complete:
• The Language Environment data set SCEERUN is installed in LNKLST or LPALST.
• There are no instances of COBLIB, VSCLLIB, or COB2LIB in LNKLST or LPALST.
• There are no instances of COBLIB, VSCLLIB, or COB2LIB in JCL STEPLIB or JOBLIB statements or in
CICS startup JCL.
• All statically bound runtime library routines for programs that are compiled with NORES have been
REPLACEd with routines from Language Environment.
• IGZEBST bootstrap modules for VS COBOL II programs that are compiled with RES were either linked
with the VS COBOL II runtime version of IGZEBST that has APAR PN74000 applied, or IGZEBST was
REPLACEd with IGZEBST from Language Environment.
If you understand these conditions, but your shop has not completed its runtime library migration, you
must complete that migration before using this book. You can use the Enterprise COBOL 4.2 Compiler and
Runtime Migration Guide at http://publibfp.dhe.ibm.com/epubs/pdf/igy3mg50.pdf for help in completing
your migration to Language Environment.
4 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
With Enterprise COBOL 5 and 6, the compiler, the debugging component, and the runtime library are all
separate, although the runtime library (Language Environment) is included with the z/OS operating system
and does not need to be purchased separately.
Support for:
XML,
Java interoperability,
OO,
integrated CICS
translator,
multithreading,
Unicode,
JSON
For a complete list of host versions and releases, see the Licensed Program Specifications for Language
Environment and for the compiler that you are using.
6 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 5. Advantages of Enterprise COBOL and Language Environment
Advantage Notes Advantage over
VS IBM
OS/VS COBOL COBOL
COBOL II
XML support Enterprise COBOL provides new statements for X X X
parsing and generating XML documents. These
statements allow programs to transform XML
content into COBOL data structures and COBOL data
structures into XML documents.
Java interoperation Enterprise COBOL includes object-oriented COBOL X X X
syntax that enables COBOL to interoperate with
Java. This Java interoperation is also supported
under IMS.
Support to run in Enterprise COBOL has a toleration level of support X X X
multiple threads for POSIX threads and signals. With Enterprise
COBOL, an application can contain COBOL programs
running on multiple threads within a process.
Support for Unicode The COBOL Unicode support uses the product z/OS X X X
Support for Unicode.
Improved Db2 Enterprise COBOL includes support for Db2 stored X X
function procedures.
Support for the Db2 coprocessor X X *
Improved CICS Enterprise COBOL includes CALL statement support X
function (for faster CICS performance than when using EXEC
CICS LINK) and eliminates the need for user-coded
BLL cells.
Increased WORKING-STORAGE space for DATA(24) X X X
and DATA(31) programs. For DATA(31), the limit is
2 GB. For DATA(24), the limit is the available space
below the 16-MB line.
Support for the Integrated CICS translator X X *
JSON support In Enterprise COBOL 6.1, support for generation of X X X
JSON texts
Starting in Enterprise COBOL 6.2, support for both
generation and parsing of JSON texts
8 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 5. Advantages of Enterprise COBOL and Language Environment (continued)
Advantage Notes Advantage over
VS IBM
OS/VS COBOL COBOL
COBOL II
Improved ILC With the common Language Environment library, ILC X X
is improved between COBOL and other Language
Environment-conforming languages. For example,
interlanguage calls between COBOL and other
languages are faster under Language Environment,
because there is significantly less overhead for each
CALL statement. Additionally, under CICS, you can
use the CALL statement to call PL/I or C programs in
place of EXEC CICS LINK.
Character Improved bit and character manipulation using X
manipulation hex literals. Improved flexibility with character
manipulation using reference modification
Top-down modular Support for top-down modular program X
program development development through nesting of programs and
improved CALL and COPY functions
Structured Support for structured programming coding X
Programming Support through:
• Inline PERFORM statements
• The CONTINUE place-holder statement
• The EVALUATE statement
• Explicit scope terminators (for example: END-IF,
END-PERFORM, END-READ)
10 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 5. Advantages of Enterprise COBOL and Language Environment (continued)
Advantage Notes Advantage over
VS IBM
OS/VS COBOL COBOL
COBOL II
Compiler options for • The SQLIMS and VLR options are available in X X X
Enterprise COBOL 5 Enterprise COBOL 5.1 with the service PTFs,
and 6 (continued) COBOL 5.2, and COBOL 6.
• The SUPPRESS and VSAMOPENFS options are
available in Enterprise COBOL 6.1 and 6.2.
• The XMLPARSE option was originally removed in
Enterprise COBOL 5.1, but was restored to COBOL
5.1 via service and is included in COBOL 5.2 and 6.
• The ZONECHECK option is available in Enterprise
COBOL 5.1 with the service PTFs and COBOL 5.2
with the service PTFs. ZONECHECK is deprecated
in COBOL 6.1 with the PTF for APAR PI71625
installed, and is replaced by NUMCHECK.
• The ZONEDATA options is available in Enterprise
COBOL 5.1 with the service PTFs, COBOL 5.2 with
the service PTFs, and COBOL 6.
12 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 5. Advantages of Enterprise COBOL and Language Environment (continued)
Advantage Notes Advantage over
VS IBM
OS/VS COBOL COBOL
COBOL II
Compiler options for The following compiler options are available to X X
COBOL for MVS & VM COBOL for MVS & VM and later programs:
• CURRENCY - allows you to define a default
currency symbol for COBOL programs.
• OPTIMIZE(FULL) - OPTIMIZE with the new
suboption of FULL optimizes object programs and
provides improved runtime performance over both
the OS/VS COBOL and VS COBOL II OPTIMIZE
options. The compiler discards unused data items
and does not generate code for any VALUE clauses
for the discarded data items.
• PGMNAME(COMPAT,LONGUPPER,LONGMIXED)
controls the handling of program names in relation
to length and case.
• RMODE(AUTO,24,ANY) - allows NORENT
programs to reside above the 16-MB line.
* The integrated Db2 coprocessor, integrated CICS translator, and 31-digit support were added as new features
to COBOL for OS/390 & VM 2.2.
14 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
would not have any impact on the final result. Truncating in the middle of a computation is often done
with packed-decimal instructions on the hardware, which can generate decimal overflows.
Normally, Enterprise COBOL programs do not set or alter the hardware's overflow mask. Without the
overflow mask being set, an overflow is suppressed at the hardware level. However, certain COBOL
features or other languages in an Interlanguage communication (ILC) application may set the overflow
mask so that a hardware exception is not suppressed when an overflow occurs. For details, see Decimal
overflow implications in ILC Applications in the Enterprise COBOL Performance Tuning Guide. When the
unsuppressed overflow exception occurs in a COBOL program, the LE condition handler is invoked, and
consequently the exception is ignored, as COBOL programs should not overflow. But the time taken to
invoke LE and transfer control back to the COBOL program decreases performance.
In addition, for ARCH(10) and ARCH(11) with the availability of the decimal floating point (DFP) facility,
and ARCH(12) with the vector decimal facility, the compiler uses the truncation capabilities of these
facilities to further improve performance. However, this can lead to more potential overflows than
previous architecture levels (of COBOL 4.2 and earlier compilers), and thus lead to performance issues
as described above. The changes in COBOL 6 to truncate earlier and using different instructions do not
change the behavior of Enterprise COBOL 6 programs compared to Enterprise COBOL 4. The only impact
is the possible performance issues, and those only affect ILC applications.
Starting with ARCH(13) in COBOL 6.3, the compiler uses the vector decimal Instruction Overflow Mask
(IOM) to suppress decimal overflows at the instruction level independently of the program mask setting.
Therefore, COBOL performance is unaffected by overflows, even in ILC applications.
OS/VS COBOL
OS/VS COBOL programs compiled with either LANGLVL(1) or LANGLVL(2) can contain either 68 COBOL
Standard or 74 COBOL Standard elements. Conversion is required in order for these programs to compile
with Enterprise COBOL. You should use conversion tools to aid in this conversion. For details, see
“Converting to 85 COBOL Standard” on page 53.
IBM COBOL
Many IBM COBOL programs will compile without change under Enterprise COBOL.
The following programs, however, will need to be upgraded before compiling with Enterprise COBOL:
• Programs compiled with the CMPR2 compiler option
• Programs that have SOM-based object-oriented COBOL syntax
• Programs that use words which are now reserved in Enterprise COBOL
• Programs that have undocumented IBM COBOL extensions
• Programs that contain the format 2 declarative syntax: USE...AFTER...LABEL PROCEDURE..., and
optionally the syntax: GO TO MORE-LABELS.
For details, see Chapter 10, “Upgrading IBM COBOL source programs,” on page 99.
Enterprise COBOL 3
Most Enterprise COBOL 3 programs will compile without change under Enterprise COBOL 5 or 6.
The following programs, however, will need to be upgraded:
• Programs that use words which are now reserved in Enterprise COBOL
• Programs that contain the format 2 declarative syntax: USE...AFTER...LABEL PROCEDURE..., and the
syntax: GO TO MORE-LABELS.
For details, see Chapter 12, “Upgrading programs from Enterprise COBOL 3,” on page 143.
16 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Enterprise COBOL 4
Most Enterprise COBOL 4 programs will compile without change under Enterprise COBOL 5 or 6.
The following programs, however, will need to be upgraded:
• Programs that use words which are now reserved in Enterprise COBOL
• Programs that contain the format 2 declarative syntax: USE...AFTER...LABEL PROCEDURE..., and the
syntax: GO TO MORE-LABELS.
For details, see Chapter 14, “Upgrading from Enterprise COBOL 4,” on page 155.
18 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Chapter 2. Do I need to recompile?
Ideally, programs should be compiled with a supported compiler (currently only IBM Enterprise COBOL
for z/OS is supported) and run with a supported runtime library (Language Environment for a supported
version of z/OS). You can migrate programs gradually, in two stages:
• Stage 1: Runtime migration. You can use the Enterprise COBOL 4.2 Compiler and Runtime Migration
Guide at http://publibfp.dhe.ibm.com/epubs/pdf/igy3mg50.pdf for help in completing your runtime
library migration.
• Stage 2: Compiler migration (you may compile only one or many programs in existing applications)
The remainder of this section explains when and why you might want to migrate your applications (run
time or source).
Migration basics
The migration process involves compiler migration (recompiling source programs with the new compiler)
and might involve a runtime migration (moving your applications to a new runtime library) as well. As part
of the migration process, you will also need to do inventory assessment and testing. As stated previously,
you are not required to do your recompilation and runtime migration concurrently.
For more details about the migration process, see “General migration tasks” on page 15.
Runtime migration
Every COBOL program requires runtime library routines to execute. With the older compilers OS/VS
COBOL and VS COBOL II, there was an option to have the runtime routines statically linked to the load
modules (the NORES compiler option) or dynamically accessed at run time (the RES compiler option).
Since COBOL/370 1.1 in 1991, all COBOL compilers default to the RES behavior.
20 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Interoperability with older levels of IBM COBOL programs
There are some restrictions for Enterprise COBOL 5 and 6 programs to call or be called by (interoperate
with) programs compiled with earlier versions of COBOL.
Record format . . . . U
Record length . . . .
Block size . . . . .
Data set name type LIBRARY
Data set version . : 2
26 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Chapter 4. Migration recommendations to Enterprise
COBOL 6
Migration to Enterprise COBOL 5 and 6 is more difficult than earlier COBOL compiler migrations (except
for the OS/VS COBOL to Enterprise COBOL migration), and it is recommended that you read this section
before you migrate to Enterprise COBOL 5 or 6.
Regression tests
The recommended migration strategy for Enterprise COBOL 6 is to compile each application (group
of programs) with COBOL 6 using SSRANGE, NUMCHECK, PARMCHECK, INITCHECK, and OPT(0), and
regression test the application alongside the same application in its current form (that is, compiled with
Enterprise COBOL 4 or earlier compilers). If you do not get any SSRANGE, NUMCHECK, PARMCHECK, or
INITCHECK errors, and you are sure that you get the same results with the new compiler as with the
earlier compilers, recompile with NOSSRANGE, NONUMCHECK, NOPARMCHECK, and OPT(2); then run a
final test and move the application into production. The reason for testing with SSRANGE, NUMCHECK,
and PARMCHECK is that some customers have found that they have invalid COBOL data that gets different
results with COBOL 6. INITCHECK can find (at compile time) cases of uninitialized data which could also
cause migration problems.
Note: You do not have to do this extra testing for programs that have already been compiled with
Enterprise COBOL 5 or 6.
Best practices
Instead of treating Enterprise COBOL 5 and 6 like business as usual, consider having a team identified
to migrate each application completely, rather than migrating one or two programs at a time. In this way,
all programs in an application will be migrated, so that future updates or fixes will not also involve a
migration. You can save costs in the long run because more programs can take advantage of the 'million
instructions per second (MIPS)' savings with Enterprise COBOL 5 and 6.
The COBOL CMPR2, FLAGMIG, and NOCOMPILE options identify source statements that need to be
converted to compile under Enterprise COBOL. The CMPR2 and FLAGMIG options are not available in
Enterprise COBOL, but you can use your older compilers with these options to flag the statements that
need to be changed in order to compile with Enterprise COBOL.
Enterprise COBOL 4.2 FLAGMIG4 compiler option
A new compiler option, FLAGMIG4, is available with APAR PM93450 for Enterprise COBOL 4.2 to help
you migrate to Enterprise COBOL 5 or 6. It is also recommended that you install PTFs for APARs
PI12240, PI26838, and PI58762 as these contain updates to the FLAGMIG4 option.
The FLAGMIG4 option identifies language elements in Enterprise COBOL 4 programs that are not
supported, or that are supported differently in Enterprise COBOL 5 or 6. The compiler generates a
warning diagnostic message for all such language elements.
Note: The source code changes for COBOL 5 and 6 are rarely used COBOL language features and do
not affect 99% of COBOL users.
Another conversion tool you might want to use is COBOL Report Writer Precompiler. It enables you to
either continue using Report Writer code or convert your Report Writer code to non-Report Writer code.
The Report Writer Precompiler is product number 5798-DYR.
These conversion tools are fully described in Appendix C, “Conversion tools for source programs,” on page
279.
If you plan to use CCCA or COBOL Report Writer Precompiler, install it at this time. For installation
instructions, see the documentation for the conversion tool(s) you plan to use.
30 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Language Environment can help you find out whether you are ever running OS/VS COBOL programs from
your inventory. Install the fix for APAR PM86742 to your Language Environment and look for one of these
warning messages about detected OS/VS COBOL programs at run time:
Note: For your programs to continue running after the following warning messages have been issued,
you must be running with the TRAP(ON) runtime option. For details, see TRAP in the z/OS Language
Environment Programming Reference.
IGZ0268W
An invocation was made of OS/VS COBOL program "program-name".
IGZ0269W
"program-lang" version "program-version" program "program-name" made a call to OS/V/S COBOL
program "program-name".
IBM Application Discovery and Delivery Intelligence and IBM Rational® Asset Analyzer for System z® can
aid by analyzing the impact of a code change for an application. See “IBM Application Discovery and
Delivery Intelligence” on page 283 for more information.
Based on the complexity ratings shown above (or your own defined complexity ratings), you can now
assign a complexity rating to each attribute within a program. Use the highest complexity rating listed as
the overall rating for that program. For an application, the highest complexity rating that you assign for
any program within the application is the complexity rating for the entire application.
Table 6 on page 32 shows estimated complexity ratings for conversions of specific program attributes.
32 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 6. Complexity ratings for program attribute conversions (continued)
Complexity
Program attribute Description of attribute rating
74 COBOL Standard COPY library 1 M C
members
ANS COBOL 4 COPY library members 1 to 10 2 M C
10 to 20 5 M C
20 + 6 M C
Stability Program with no plans for changes 0
Program changes twice a year 3
Program changes every month or more often 8+
Files accessed 1 to 3 1 M C
3 to 5 2 M C
6+ 3 M C
No source code for module Module needs rewrite 102
Module does not need to be upgraded 6
CICS macro level program 10
Compiled by Full ANS COBOL 4 compiler 4 C
(pre- compiler)
Compiled by OS/VS COBOL 1.2 compiler LANGLVL(2) no manual changes 1 M C
LANGLVL(1) no manual changes 1 M C
LANGLVL(2) manual changes 4 M C
LANGLVL(1) manual changes 4 M C
Uses language with changed results Complex OCCURS DEPENDING ON 4 C
Combined abbreviated relation conditions 6 M
Floating-point arithmetic 6 M
Exponentiation 6 M
Signed data 2
Binary data 2
Numeric USAGE DISPLAY 5
Access methods used ISAM3 10 M C
BDAM 10 C4
TCAM 10
Uses Report Writer language (if not using 6 M C
Report Writer Precompiler)
Uses Report Writer language (if using 0
Report Writer Precompiler)
CICS 4
1. For additional information, see Appendix G, “Preventing file status 39 for QSAM files,” on page 325.
2. Non-IBM vendors can recreate COBOL source code from object code.
3. Support for ISAM was removed with z/OS 1.7.
4. This is a partial conversion.
On categories marked M you can gather information using the OS/VS COBOL MIGR option. On categories
marked C you can gather information using the COBOL conversion tool (CCCA).
34 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 7. Assigning program conversion priorities (continued)
Conversion
priority Complexity rating Other considerations
4 9 to 10 Great importance to your organization
Very high conversion effort
Figure 1. Steps for converting an OS/VS COBOL program to an Enterprise COBOL program
36 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Programs with CICS
To convert an OS/VS COBOL program that contains CICS commands to an Enterprise COBOL program, do
the steps shown in the flowchart below.
Figure 2. Steps for converting an OS/VS COBOL program containing CICS commands
38 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Figure 4. Steps for converting an OS/VS COBOL program and retaining Report Writer statements
40 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• For non-CICS applications, use your shop's backup and restore facilities to recover.
8. Run in production mode.
After cut over, monitor the application for a short time to ensure that you are getting the results
expected. After that, your source conversion task is completed.
BLANK WHEN ZERO clause and asterisk (*) override “BLANK WHEN
ZERO clause
and asterisk (*)
override” on page
62
CALL statement changes—procedure names and file names in USING phrase “CALL statement
changes ” on page
70
46 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 8. Language element differences between OS/VS COBOL and Enterprise COBOL (continued)
Dynamic CALL statements to programs with alternate entry points without an intervening CANCEL “Dynamic CALL
statements to
ENTRY points ” on
page 72
GIVING phrase of USE AFTER STANDARD ERROR declarative CCCA “GIVING phrase
of USE AFTER
STANDARD ERROR
declarative ” on
page 58
48 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 8. Language element differences between OS/VS COBOL and Enterprise COBOL (continued)
OPEN statement failing for QSAM files (file status 39) “OPEN statement
failing for VSAM files
(file status 39)” on
page 59
OPEN statement failing for VSAM files (file status 39) “OPEN statement
failing for QSAM
files (file status 39)”
on page 59
OPEN statement with LEAVE, REREAD, and DISP phrases CCCA “OPEN statement
with the LEAVE,
REREAD, and DISP
phrases ” on page
59
READ statement - redefined record keys in the KEY phrase “READ statement
- redefined record
keys in the KEY
phrase” on page
66
RECORD KEY phrase and ALTERNATE RECORD KEY phrase “RECORD KEY
phrase and
ALTERNATE
RECORD KEY
phrase” on page
66
50 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 8. Language element differences between OS/VS COBOL and Enterprise COBOL (continued)
UNSTRING statement—coding with 'OR', 'IS', or a numeric edited item CCCA “UNSTRING
statement - coding
with 'OR', 'IS', or
a numeric edited
item ” on page 68
VALUE clause—signed value in relation to the PICTURE clause CCCA “VALUE clause -
signed value in
relation to the
PICTURE clause ”
on page 68
52 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Converting to 85 COBOL Standard
To help you make the needed changes when upgrading to Enterprise COBOL, you can use any of several
means, including the information provided elsewhere in this Migration Guide.
A brief description of two of the helpful mechanisms (CCCA and the MIGR option) follows. For additional
information, see Appendix C, “Conversion tools for source programs,” on page 279.
Tip: Non-IBM tools are also available to help automate the conversion to the 85 COBOL Standard.
Report Writer
The Report Writer feature is supported through use of the Report Writer Precompiler. In order for existing
Report Writer code to work with Enterprise COBOL, you have the following considerations:
• “Keep existing Report Writer code and use the Report Writer Precompiler” on page 53
• “Convert existing Report Writer code using the Report Writer Precompiler” on page 54
• “Run existing OS/VS COBOL-compiled Report Writer programs under Language Environment” on page
54
• “Report Writer language items affected” on page 54
Note: Starting with Enterprise COBOL 5.1, COBOL Report Writer Precompiler 1.6.01 or later is required
due to changes to the compiler architecture. Updates to the COBOL Report Writer must be obtained from
SPC Systems subject to an SPC Systems support contract. For program services and technical support
(including Q&A), contact SPC Systems at https://www.spc-systems.com.
For more information about the COBOL Report Writer Precompiler product, see “COBOL Report Writer
Precompiler” on page 286.
Keep existing Report Writer code and use the Report Writer Precompiler
When you recompile existing Report Writer applications (or newly written applications) with the Report
Writer Precompiler, and use the output as input to the Enterprise COBOL compiler, your Report Writer
applications can run above the 16-MB line. Through Enterprise COBOL, you can also extend their
processing capabilities.
Convert existing Report Writer code using the Report Writer Precompiler
If you permanently convert Report Writer code to non-Report Writer code, you can stop using the Report
Writer Precompiler and just use the Enterprise COBOL compiler. However, this might produce hard-to-
maintain COBOL code.
When converting Report Writer code to non-Report Writer code, the Precompiler generates variable
names and paragraph names. These names might not be meaningful, and thus hard to identify when
attempting to make changes to the program after the conversion. You can change the names to be
meaningful, but this might be difficult and time consuming.
54 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
ISAM file handling
Enterprise COBOL does not support the processing of ISAM files, nor does z/OS 1.7 and later releases.
You must convert ISAM files to VSAM/KSDS files before you move to z/OS 1.7 or later.
Conversion options
Two conversion tools can help you convert ISAM files to VSAM/KSDS files. You can use either IDCAMS
REPRO or CCCA. The IDCAMS REPRO facility will perform the conversion unless the file has a hardware
dependency. IDCAMS repro will only work for ISAM files on z/OS 1.6 or earlier. You must migrate ISAM to
VSAM/KSDS before moving to z/OS 1.7 or later.
The COBOL conversion tool (CCCA) can automatically convert the file definition and I/O statements from
your ISAM COBOL language to VSAM/KSDS COBOL language. The CCCA conversion tool is described in
Appendix C, “Conversion tools for source programs,” on page 279.
Communication feature
The Communication feature is not supported by Enterprise COBOL.
Enterprise COBOL supports the DATE special register. It is valid only as the sending field in an ACCEPT
statement. DATE has the 6-byte alphanumeric format:
Therefore, you must change an OS/VS COBOL program with statements similar to the following one:
An example of one way to change it, keeping the two-digit year format, is as follows:
01 DATE-IN-PROGRAM.
02 MONTH-OF-YEAR PIC X(02).
02 FILLER PIC X(01) VALUE "/".
02 DAY-OF-MONTH PIC X(02).
02 FILLER PIC X(01) VALUE "/".
02 YEAR PIC X(02).
01 ACCEPT-DATE.
02 YEAR PIC X(02).
02 MONTH-OF-YEAR PIC X(02).
02 DAY-OF-MONTH PIC X(02).
56 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
. . .
ACCEPT ACCEPT-DATE FROM DATE.
MOVE CORRESPONDING ACCEPT-DATE TO DATE-IN-PROGRAM.
01 DATE-IN-PROGRAM.
02 MONTH-OF-YEAR PIC X(02).
02 FILLER PIC X(01) VALUE "/".
02 DAY-OF-MONTH PIC X(02).
02 FILLER PIC X(01) VALUE "/".
02 YEAR PIC X(04).
01 CURRENT-DATE.
02 YEAR PIC X(04).
02 MONTH-OF-YEAR PIC X(02).
02 DAY-OF-MONTH PIC X(02).
. . .
MOVE FUNCTION CURRENT-DATE(1:8) TO CURRENT-DATE.
MOVE CORRESPONDING CURRENT-DATE TO DATE-IN-PROGRAM.
EXAMINE statement
OS/VS COBOL accepted the EXAMINE statement; Enterprise COBOL does not.
Therefore, if your OS/VS COBOL program contains coding similar to the following one:
MOVE 0 TO TALLY
INSPECT DATA-LENGTH TALLYING TALLY FOR CHARACTERS BEFORE " "
You can continue to use the TALLY special register wherever you can specify a WORKING-STORAGE
elementary data item of integer value.
EXHIBIT statement
OS/VS COBOL accepted the EXHIBIT statement; Enterprise COBOL does not.
With Enterprise COBOL, you can use DISPLAY statements to replace EXHIBIT statements. However,
the DISPLAY statement does not perform all the functions of the EXHIBIT statement.
Corrective action for EXHIBIT NAMED
You can replace the EXHIBIT NAMED statement directly with a DISPLAY statement:
58 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
The ON statement allows selective execution of statements it contains. Similar functions are provided
in Enterprise COBOL by the EVALUATE statement and the IF statement.
OPEN statement failing for QSAM files (file status 39)
In OS/VS COBOL, the fixed file attributes for QSAM files did not need to match your COBOL program
or JCL for a successful OPEN. In Enterprise COBOL, if the following conditions do not match, an OPEN
statement in your program might not run successfully:
• The fixed file attributes specified in the DD statement or the data set label for a file
• The attributes specified for that file in the SELECT and FD statements of your COBOL program
Mismatches in the attributes for file organization, record format (fixed or variable), the code set, or
record length result in a file status code 39, and the OPEN statement fails.
To prevent common file status 39 problems, see Appendix G, “Preventing file status 39 for QSAM
files,” on page 325.
OPEN statement failing for VSAM files (file status 39)
In OS/VS COBOL, the RECORDSIZE defined in your VSAM files associated with IDCAMS was not
required to match your COBOL program for a successful OPEN. In Enterprise COBOL they must match.
The following rules apply to VSAM ESDS, KSDS, and RRDS file definitions:
If you use the COBOL language, the Enterprise COBOL USE FOR DEBUGGING ON ALL PROCEDURES
declarative can perform functions similar to READY TRACE and RESET TRACE.
For example:
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-370 WITH DEBUGGING MODE.
. . .
DATA DIVISION.
. . .
WORKING-STORAGE SECTION.
01 TRACE-SWITCH PIC 9 VALUE 0.
where DEBUG-NAME is a field of the DEBUG-ITEM special register that displays the procedure-name
causing execution of the debugging procedure. (In this example, the object program displays the
names of procedures PARAGRAPH-4 through PARAGRAPH-6 as control reaches each procedure
within the range.)
At run time, you must specify PARM=/DEBUG in your EXEC statement to activate this debugging
procedure. In this way, you have no need to recompile the program to activate or deactivate the
debugging declarative.
REMARKS paragraph
OS/VS COBOL accepted the REMARKS paragraph.
Enterprise COBOL does not accept the REMARKS paragraph. As a replacement, use comment lines
beginning with an * in column 7 or use the floating comment indicator *>.
START . . . USING KEY statement
OS/VS COBOL allowed the START statement with the USING KEY phrase; Enterprise COBOL does not.
In Enterprise COBOL, you can specify the START statement with the KEY IS phrase.
THEN as a statement connector
OS/VS COBOL accepted the use of THEN as a statement connector.
The following example shows the OS/VS COBOL usage:
Enterprise COBOL does not support the use of THEN as a statement connector. Therefore, in
Enterprise COBOL change it to:
MOVE A TO B
ADD C TO D
60 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
An example of one way to change it is as follows:
TRANSFORM statement
OS/VS COBOL supported the TRANSFORM statement. Enterprise COBOL does not support the
TRANSFORM statement, but it does support the INSPECT statement. Therefore, any TRANSFORM
statements in your OS/VS COBOL program must be replaced by INSPECT CONVERTING statements.
For example, in the following OS/VS COBOL TRANSFORM statement:
INSPECT CONVERTING evaluates each character just as TRANSFORM does, changing each A to C,
each B to A, and each C to T.
After the INSPECT CONVERTING statement is executed. DATA-T contains "CATXYZTTT:.
USE BEFORE STANDARD LABEL
OS/VS COBOL accepted the USE BEFORE STANDARD LABEL statement; Enterprise COBOL does not.
Therefore, you must remove any occurrences of the USE BEFORE STANDARD LABEL statement.
Enterprise COBOL does not support nonstandard labels, so you cannot process nonstandard labeled
files with Enterprise COBOL.
A = B AND ( < C OR D)
(A = 0 AND B) = 0
ACCEPT statement
OS/VS COBOL accepted the ACCEPT statement without the keyword FROM between the identifier and
the mnemonic or function name.
Enterprise COBOL does not accept such an ACCEPT statement.
BLANK WHEN ZERO clause and asterisk (*) override
In OS/VS COBOL, if you specified the BLANK WHEN ZERO clause and the asterisk (*) as a zero
suppression symbol for the same entry, zero suppression would override BLANK WHEN ZERO.
Enterprise COBOL does not accept these two language elements when they are specified for the same
data description entry. Thus Enterprise COBOL must not contain instances of both the clause and the
symbol in one data description entry.
If you have specified both the BLANK WHEN ZERO clause and the asterisk as a zero suppression
symbol in your OS/VS COBOL programs, to get the same behavior in Enterprise COBOL, remove the
BLANK WHEN ZERO clause.
CLOSE . . . FOR REMOVAL statement
OS/VS COBOL allowed the FOR REMOVAL clause for sequential files, and it had an effect on the
execution of the program. Enterprise COBOL syntax-checks the statement but it has no effect on the
execution of the program.
Comparing group to numeric packed-decimal item
OS/VS COBOL allowed a comparison between a group and a numeric packed-decimal item, but
generated code that produced an incorrect result.
For example, the result of the comparison below is the message
05 COMP-TABLE.
10 COMP-PAY PIC 9(4).
10 COMP-HRS PIC 9(3).
05 COMP-ITEM PIC S9(7) COMP-3.
PROCEDURE DIVISION.
MOVE 0 TO COMP-PAY COMP-HRS.
MOVE 1 TO COMP-ITEM.
IF COMP-ITEM > COMP-TABLE
DISPLAY '1 > 0'
ELSE
DISPLAY '1 IS NOT > 0'.
62 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Index names
OS/VS COBOL allowed the use of qualified index names.
Enterprise COBOL does not allow qualified index names; index names must be unique if referenced.
LABEL RECORD IS statement
OS/VS COBOL accepted a LABEL RECORD clause without the word RECORD. You could have LABEL IS
OMITTED instead of LABEL RECORD IS OMITTED.
Enterprise COBOL does not accept such a LABEL RECORD clause.
MOVE statement - binary value and DISPLAY value
Although the Enterprise COBOL TRUNC(OPT) compiler option is recommended for compatibility with
the OS/VS COBOL NOTRUNC compiler option, you might receive different results involving moves of
fullword binary items (USAGE COMP with Picture 9(5) through Picture 9(9)).
For example:
WORKING-STORAGE SECTION.
01 WK1 USAGE COMP-4 PIC S9(9).
PROCEDURE DIVISION.
This example actually shows COBOL coding that is not valid, since 10 digits are being moved into a
9-digit item.
For example, the results are as follows when compiled with the following compiler options:
For OS/VS COBOL, the binary value contained in the binary data item is not the same as the DISPLAY
value. The DISPLAY value is based on the number of digits in the PICTURE clause and the binary value
is based on the size of the binary data item, in this case, 4 bytes. The actual value of the binary data
item in decimal digits is 1234567890.
For Enterprise COBOL, the binary value and the DISPLAY value are equal because the truncation that
occurred was based on the number of digits in the PICTURE clause.
This situation is flagged by MIGR in OS/VS COBOL and by Enterprise COBOL when compiled with
TRUNC(OPT).
MOVE CORRESPONDING statement
• OS/VS COBOL allowed more than one receiver with MOVE CORRESPONDING; Enterprise COBOL
does not. Therefore, you must change the following OS/VS COBOL statement:
• Releases prior to OS/VS COBOL 1.2.4 accepted nonunique subordinate data items in the receiver of
a MOVE CORRESPONDING statement; Enterprise COBOL does not. For example:
01 KANCFUNC.
03 CL PIC XX.
03 KX9 PIC XX.
03 CC PIC XX.
For Enterprise COBOL, change the data items in the receiver to have unique names.
MOVE statement - multiple TO specification
OS/VS COBOL allowed the reserved word TO to precede each receiver in a MOVE statement. For
example:
MOVE aa TO bb TO cc
MOVE aa TO bb cc
77 A PIC 999.
77 B PIC 99.
.
.
.
MOVE A TO B.
You can get the same behavior with Enterprise COBOL if the compiler option DIAGTRUNC is in effect.
OCCURS clause
OS/VS COBOL allowed a nonstandard order for phrases following the OCCURS clause; Enterprise
COBOL does not.
For example, the following code sequence would be allowed in OS/VS COBOL:
01 D PIC 999.
01 A.
02 B OCCURS 1 TO 200 TIMES
ASCENDING KEY C
DEPENDING ON D
INDEXED BY H.
02 C PIC 99.
In Enterprise COBOL, the above example must be changed to the following code sequence:
01 D PIC 999.
01 A.
02 B OCCURS 1 TO 200 TIMES
DEPENDING ON D
ASCENDING KEY C
64 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
INDEXED BY H.
02 C PIC 99.
Enterprise COBOL does not allow a second UNTIL statement. It must be removed as shown in the
following example:
Periods in Area A
OS/VS COBOL allowed you to code a period in Area A following an Area-A item (or no item) that was
not valid. With Enterprise COBOL, a period in Area A must be preceded by a valid Area-A item.
Periods, consecutive in any division
OS/VS COBOL allowed you to code two consecutive periods in any division.
Enterprise COBOL issues a warning message (RC = 4) if two periods in a row are found in the
PROCEDURE DIVISION, and a severe message (RC = 12) if two periods in a row are found in either the
ENVIRONMENT DIVISION or the DATA DIVISION.
The following code would be accepted by OS/VS COBOL, but would receive a severe (RC = 12) error
and a warning (RC = 4) under Enterprise COBOL:
WORKING-STORAGE SECTION.
01 A PIC 9..
.
.
.
MOVE 1 TO A..
.
.
GOBACK.
Enterprise COBOL does not accept statements such as the statements in the example above. You
must change the Z9 to either ZZ or 99.
A of B of B
FILE SECTION.
FD THE-FILE RECORD IS VARYING DEPENDING ON REC-LENGTH.
01 THE-RECORD PICTURE X(5000) .
WORKING-STORAGE SECTION.
01 REC-LENGTH PICTURE 9(5) COMPUTATIONAL.
01 SAVED-RECORD PICTURE X(5000).
PROCEDURE DIVISION.
* Read a record of unknown length.
READ THE-FILE.
DISPLAY REC-LENGTH.
* or use REC-LENGTH to access the right amount of data:
MOVE THE-RECORD (1:REC-LENGTH) TO SAVED-RECORD.
For more information about the RECORD clause, see the Enterprise COBOL for z/OS Language
Reference.
REDEFINES clause in SD or FD entries
Releases prior to OS/VS COBOL 1.2.4 accepted a REDEFINES clause in a level-01 SD or FD; Enterprise
COBOL and OS/VS COBOL 1.2.4 do not.
For example, the following code sequence is not valid:
SD ...
01 SORT-REC-HEADER.
66 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
05 SORT-KEY PIC X(20).
05 SORT-HEADER-INFO PIC X(40).
05 FILLER PIC X(20).
01 SORT-REC-DETAIL REDEFINES SORT-REC-HEADER.
05 FILLER PIC X(20).
05 SORT-DETAIL-INFO PIC X(60).
01 E.
03 F OCCURS 10.
05 G PIC X.
03 I REDEFINES F PIC X.
Enterprise COBOL does not allow tables to be redefined, and issues a severe (RC = 12) message for
the example above.
Relation conditions
Releases prior to OS/VS COBOL 1.2.4 accepted operators in relation conditions that are not valid.
The following table lists the operators accepted by OS/VS COBOL 1.2.3 that are not accepted by
Enterprise COBOL. It also shows the valid coding for Enterprise COBOL programs.
SORT FILE-1
ON ASCENDING KEY AKEY-1
INPUT PROCEDURE IPROC-1
OUTPUT PROCEDURE OPROC-1
UNTIL AKEY-1 = 99.
SORT FILE-2
ON ASCENDING KEY AKEY-2
INPUT PROCEDURE IPROC-2
OUTPUT PROCEDURE OPROC-2
10 TIMES.
Enterprise COBOL does not accept statements such as the statements in the example above.
In a SORT statement, the correct syntax allows ASCENDING KEY or DESCENDING KEY followed by a
data-name which is the sort key. The word KEY is optional.
SORT SORT-FILE
ASCENDING KEY IS SD-NAME-FIELD
USING INPUT-FILE
GIVING SORTED-FILE.
SORT or MERGE
With OS/VS COBOL, a MOVE to the SD buffer before the first RETURN in a SORT or MERGE output
PROCEDURE did not overlay the data of the first record.
In Enterprise COBOL such a MOVE would overlay the data of the first record. During a SORT or MERGE
operation, the SD data item is used. You must not use it in the OUTPUT PROCEDURE before the
first RETURN statement executes. If data is moved into this record area before the first RETURN
statement, the first record to be returned will be overwritten.
STRING statement - sending field identifier
OS/VS COBOL allowed a numeric sending field identifier that is not an integer. Under Enterprise
COBOL, a numeric sending field identifier must be an integer.
UNSTRING statement - coding with 'OR', 'IS', or a numeric edited item
OS/VS COBOL would not issue a diagnostic error message for UNSTRING statements containing any of
the following instances of coding that is not valid:
1. Lack of the required word "OR" between literal-1 and literal-2, as in:
Enterprise COBOL allows only nonnumeric data items as senders in the UNSTRING statement.
Enterprise COBOL issues a message if an UNSTRING statement containing any of these errors is
encountered.
UNSTRING statement - multiple INTO phrases
OS/VS COBOL issued a warning (RC = 4) message when multiple INTO phrases were coded. For
example:
Enterprise COBOL does not allow multiple INTO phrases in an UNSTRING statement.
VALUE clause - signed value in relation to the PICTURE clause
In OS/VS COBOL, the VALUE clause literal could be signed if the PICTURE clause was unsigned.
In Enterprise COBOL, the VALUE clause literal must match the PICTURE clause and the sign must be
removed.
68 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Language elements that changed from OS/VS COBOL
Several OS/VS COBOL language elements are changed in Enterprise COBOL in order to conform to 85
COBOL Standard.
For some elements, the syntax of the language is different. For others, the language syntax is unchanged,
but the execution results can be different because semantics changed.
For each element listed, there is a brief description pointing out the differences in results and what
actions to take. Clarifying coding examples are also given as needed.
ALPHABETIC class changes
In OS/VS COBOL, only uppercase letters and the space character were considered to be ALPHABETIC.
In Enterprise COBOL, uppercase letters, lowercase letters, and the space character are considered to
be ALPHABETIC.
If your OS/VS COBOL program uses the ALPHABETIC class test, and the data tested consists of mixed
uppercase and lowercase letters, there can be differences in execution results. In such cases, you can
ensure identical results by substituting the Enterprise COBOL ALPHABETIC-UPPER class test for the
OS/VS COBOL ALPHABETIC test.
ALPHABET-NAME clause changes: ALPHABET keyword
In OS/VS COBOL, the keyword ALPHABET was not allowed in the ALPHABET-NAMES clause.
In Enterprise COBOL, there is a keyword ALPHABET and it is required.
Arithmetic statement changes
Enterprise COBOL supports the following arithmetic items with enhanced accuracy:
• Use of floating-point data items
• Use of floating-point literals
• Use of fractional exponentiation
Therefore, for arithmetic statements that contain these items, Enterprise COBOL might provide more
accurate results than OS/VS COBOL. You will need to test your applications to verify that these
changes do not have a negative impact on them.
ASSIGN clause changes
Enterprise COBOL supports only the following format of the ASSIGN clause:
ASSIGN TO assignment-name
The sample code above should be rewritten as shown in the following example in order to compile
with Enterprise COBOL:
In this example, you would modify the assembler program (ASMMOD) so that it does not branch to
an alternative location. Instead, it will pass back the number zero to the calling routine if there are no
errors, and a nonzero return value if an error occurred. The nonzero value would be used to determine
which paragraph in the COBOL program would handle the error condition.
Many COBOL programmers code assembler programs that use the 390 SPIE mechanism to get control
when there is an error or condition. These routines can pass control to a COBOL program at a
paragraph whose name was passed to the SPIE routine. Applications that use these user-written SPIE
routines should be converted to use Language Environment condition handling.
Combined abbreviated relation condition changes
Three considerations affect combined abbreviated relation conditions:
• NOT and logical operator/relational operator evaluation
• Parenthesis evaluation
• Optional word IS
All are described in the following sections.
70 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
NOT and logical operator/relational operator evaluation: OS/VS COBOL with LANGLVL(1) accepted
the use of NOT in combined abbreviated relation conditions as follows:
• When only the subject of the relation condition is implied, NOT is considered a logical operator. For
example:
is equivalent to:
• When both the subject and the relational operator are implied, NOT is considered to be part of the
relational operator.
For example:
is equivalent to:
OS/VS COBOL with LANGLVL(2) and Enterprise COBOL in combined abbreviated relation conditions
consider NOT to be:
• Part of the relational operator in the forms NOT GREATER THAN, NOT >, NOT LESS THAN, NOT <,
NOT EQUAL TO, and NOT =. For example:
is equivalent to:
• NOT in any other position is considered to be a logical operator (and thus results in a negated
relation condition). For example:
is equivalent to:
To ensure that you get the execution results that you want when moving from OS/VS COBOL with
LANGLVL(1), you should expand all abbreviated combined conditions to their full unabbreviated
forms.
Parenthesis evaluation: OS/VS COBOL accepted the use of parentheses within an abbreviated
combined relational condition.
Enterprise COBOL supports most parentheses usage as IBM extensions. However, there are some
differences:
• Within the scope of an abbreviated combined relation condition, Enterprise COBOL does not support
relational operators inside parentheses. For example:
A = B AND ( < C OR D)
• Some incorrect usages of parentheses in relation conditions were accepted by OS/VS COBOL, but
are not accepted by Enterprise COBOL. For example:
(A = 0 AND B) = 0
A = B OR IS C AND IS D
Enterprise COBOL does not accept this use of the optional word IS. In Enterprise COBOL, delete the
word IS when used in this manner.
Enterprise COBOL does permit the use of the optional word IS as part of the relational operator in
abbreviated combined relational conditions. For example:
A = B OR IS = C AND IS = D
01 RECORD-A.
05 FIELD-A...
05 FIELD-B...
01 RECORD1.
05 FIELD-A...
05 FIELD-B...
Enterprise COBOL does not accept this COPY statement. To compile with Enterprise COBOL, use the
following statement:
01 RECORD1.
COPY MBR-A REPLACING ==01 RECORD-A.== BY == ==.
72 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• For VSAM files, see Table 11 on page 74.
If your OS/VS COBOL program uses status key values to determine the course of execution, you must
modify the program to use the new status key values. For complete information about Enterprise
COBOL file status codes, see the Enterprise COBOL for z/OS Language Reference.
30 30 Permanent error
90 37 Attempt to open a file not on a mass storage device
90 90 Other errors with no further information
91 91 VSAM password failure
92 41 OPEN attempted for a file in OPEN mode
92 42 CLOSE attempted for a file not in OPEN mode
92 43 REWRITE attempted when last I/O statement was not
READ or DELETE
92 47 READ attempted when file not in OPEN INPUT or I-O
mode
92 48 WRITE attempted when file not in OPEN OUTPUT, I-O, or
EXTEND mode
92 49 DELETE or REWRITE attempted when file not in OPEN
I-O mode
93 93 VSAM resource not available
93 96 35 Nonoptional file not available
94 46 Sequential READ attempted with no valid next record
95 39 Conflict of fixed file attributes; OPEN fails
74 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 11. Status key values: VSAM files (continued)
OS/VS Enterprise COBOL Meaning
95 95 Not valid or incomplete VSAM file information
96 96 No file identification (no DD statement for this VSAM file)
97 97 (when OPEN statement execution successful; file integrity
VSAMOPENFS(COMPAT), the verified
default, is in effect)
00 (when OPEN statement execution successful; file integrity
VSAMOPENFS(SUCC) is in verified
effect)
bbbbFIRST
In Enterprise COBOL, the JUSTIFIED clause does not affect the initial placement of the data within
the data item. If a VALUE and JUSTIFIED clause are both specified for an alphabetic or alphanumeric
item, the initial value is left-justified within the data item. For example:
FIRSTbbbb
To achieve unchanged results in Enterprise COBOL, you can specify the literal value as occupying all
nine character positions of DATA-1. For example:
bbbbFIRST
RECEIVE-FIELD contains the value 123bbb (left-justified), where 'b' represents a blank.
With Enterprise COBOL, a MOVE statement transfers the trailing zeros, and a comparison includes
them.
For example, after the following MOVE statement is executed:
01 grp1.
03 yy PIC S99.
03 mm PIC S99.
03 dd PIC S99.
Enterprise COBOL issues an S-level message when the IF NUMERIC class test is used for GROUP
items whose subordinates are signed.
Numeric data changes
Enterprise COBOL uses the NUMPROC compiler option to alter the code generated for decimal data.
While NUMPROC(NOPFD) will cause processing more similar to OS/VS COBOL than NUMPROC(PFD),
results are not the same in all cases. The results of MOVE statements, comparisons, and arithmetic
statements might differ from OS/VS COBOL, particularly when the fields have not been initialized.
Programs that rely on data exceptions to either identify contents of decimal data items that are not
valid or to terminate abnormally might need to be changed to use the class test to validate data in
decimal data items.
Since Enterprise COBOL 5.2, you can use the ZONEDATA(MIG) (replaced by
INVDATA(FORCENUMCMP) in Enterprise COBOL 6.2 with PTFs for APAR PH31500 installed) to ease
your migration to COBOL 5 or 6. When the INVDATA(FORCENUMCMP) option is in effect, the compiler
generates instructions to do numeric comparisons that ignore the zone bits of each digit in zoned
decimal data items. The compiler will also avoid performing known optimizations that might produce
a different result than COBOL 4 when a zoned decimal data item has invalid zone bits. For more
information, see INVDATA.
OCCURS DEPENDING ON clause: ASCENDING and DESCENDING KEY phrase
OS/VS COBOL accepted a variable-length key in the ASCENDING and DESCENDING KEY phrases of
the OCCURS DEPENDING ON clauses as an IBM extension.
In Enterprise COBOL, you cannot specify a variable-length key in the ASCENDING or DESCENDING
KEY phrase.
OCCURS DEPENDING ON clause: value for receiving items changed
In OS/VS COBOL, the current value of the OCCURS DEPENDING ON (ODO) object is always used for
both sending and receiving items.
In Enterprise COBOL, for sending items, the current value of the ODO object is used. For receiving
items:
• If a group item contains both the subject and object of an ODO, and is not followed in the same
record by a nonsubordinate data item, the maximum length of the item is used.
76 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• If a group item contains both the subject and object of an ODO and is followed in the same record by
a nonsubordinate data item, the actual length of the receiving item is used.
• If a group item contains the subject, but not the object of an ODO, the actual length of the item is
used.
When the maximum length is used, it is not necessary to initialize the ODO object before the table
receives data. For items whose location depends on the value of the ODO object, you need to set
the object of the OCCURS DEPENDING ON clause before using them in the using phrase of a CALL
statement. Under Enterprise COBOL, for any variable-length group that is not variably located, you do
not need to set the object for the item when it is used in the USING BY REFERENCE phrase of the
CALL statement. This is true even if the group is described by the second bullet above.
For example:
01 TABLE-GROUP-1
05 ODO-KEY-1 PIC 99.
05 TABLE-1 PIC X(9)
OCCURS 1 TO 50 TIMES DEPENDING ON ODO-KEY-1.
01 ANOTHER-GROUP.
05 TABLE-GROUP-2.
10 ODO-KEY-2 PIC 99.
10 TABLE-2 PIC X(9)
OCCURS 1 to 50 TIMES DEPENDING ON ODO-KEY-2.
05 VARIABLY-LOCATED-ITEM PIC X(200).
. . .
PROCEDURE DIVISION.
. . .
MOVE SEND-ITEM-1 TO TABLE-GROUP-1
. . .
MOVE ODO-KEY-X TO ODO-KEY-2
MOVE SEND-ITEM-2 TO TABLE-GROUP-2.
When TABLE-GROUP-1 is a receiving item, Enterprise COBOL moves the maximum number of
character positions for it (450 bytes for TABLE-1 plus two bytes for ODO-KEY-1). Therefore, you need
not initialize the length of TABLE-1 before moving the SEND-ITEM-1 data into the table.
However, a nonsubordinate VARIABLY-LOCATED-ITEM follows TABLE-GROUP-2 in the record
description. In this case, Enterprise COBOL uses the actual value in ODO-KEY-2 to calculate the
length of TABLE-GROUP-2, and you must set ODO-KEY-2 to its valid current length before moving the
SEND-ITEM-2 data into the group receiving item.
ON SIZE ERROR phrase: changes in intermediate results
For OS/VS COBOL, the SIZE ERROR phrase for the DIVIDE and MULTIPLY statements applied to both
intermediate and final results.
For Enterprise COBOL, the SIZE ERROR phrase for the DIVIDE and MULTIPLY statements applies only
to final results. This is a change between the 74 COBOL Standard and the 85 COBOL Standard. This
change might or might not affect your programs.
Therefore, if your OS/VS COBOL program depends upon SIZE ERROR detection for intermediate
results, you might need to change it.
Optional word IS
For OS/VS COBOL programs, no MIGR message would be issued if the optional word IS immediately
preceded objects within an abbreviated combined relation condition. For example:
A = B OR IS C AND IS D
Enterprise COBOL does not accept this use of the optional word IS. In Enterprise COBOL, delete the
word IS when used in this manner.
Enterprise COBOL does permit the use of the optional word IS as part of the relational operator in
abbreviated combined relational conditions. For example:
A = B OR IS = C AND IS = D
X: 1 1 1 2 2 2 3 3
Y: 1 2 3 1 2 3 2 3
X: 1 1 1 2 2 3
Y: 1 2 3 2 3 3
By using nested PERFORM statements, you could achieve the same processing results as in OS/VS
COBOL, as follows:
MOVE 1 TO X, Y, Z
PERFORM EX-1 VARYING X FROM 1 BY 1 UNTIL X > 3
. . .
EX-1.
PERFORM ABC VARYING Y FROM Z BY 1 UNTIL Y > 3.
MOVE X TO Z.
ABC.
78 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Enterprise COBOL supports only the following forms of the RESERVE clause:
If your OS/VS COBOL program uses either the RESERVE integer ALTERNATE AREA or the RESERVE
integer ALTERNATE AREAS format, you must specify the RESERVE clause with integer + 1 areas to
get equivalent processing under Enterprise COBOL. That is, the OS/VS COBOL phrase RESERVE 2
ALTERNATE AREAS is equivalent to RESERVE 3 AREASA in Enterprise COBOL.
Under OS/VS COBOL with LANGLVL(1), the interpretation of the RESERVE integer AREAS format
differed from the interpretation of this format using Enterprise COBOL.
With LANGLVL(1), using the RESERVE integer AREA or RESERVE integer AREAS format, you must
specify the RESERVE clause with integer + 1 areas to get equivalent processing under Enterprise
COBOL.
Reserved word list changes
Differences exist between the reserved word list for Enterprise COBOL and OS/VS COBOL. Appendix
B, “COBOL reserved word comparison,” on page 255 contains a complete listing of reserved words.
SEARCH statement changes
In OS/VS COBOL, the ASCENDING and DESCENDING KEY data items could be specified either as the
subject or as the object of the WHEN relation-condition of the SEARCH statement.
In Enterprise COBOL, the WHEN phrase data-name (the subject of the WHEN relation-condition) must
be an ASCENDING or a DESCENDING KEY data item in this table element, and identifier-2 (the object
of the WHEN relation-condition) must not be an ASCENDING or DESCENDING key data item for this
table element.
OS/VS COBOL accepted the following statement; Enterprise COBOL does not:
The following SEARCH example will execute under both Enterprise COBOL and OS/VS COBOL:
01 VAL PIC X.
01 TABLE-01.
05 TABLE-ENTRY
OCCURS 100 TIMES
ASCENDING KEY IS KEY-1
INDEXED BY INDEX-NAME-1.
10 FILLER PIC X.
10 KEY-1 PIC X.
SEARCH ALL TABLE-ENTRY
AT END DISPLAY "ERROR"
WHEN KEY-1 ( INDEX-NAME-1 ) = VAL
DISPLAY "TABLE RECORDS OK".
80 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
For these fields, in the Enterprise COBOL UNSTRING statement, any associated subscripting,
indexing, or length calculation is evaluated once: immediately before the examination of the delimiter
sending fields. For example:
In OS/VS COBOL, subscript IND-1 would be reevaluated before the second receiver ZZ was filled.
In Enterprise COBOL, the subscript IND-1 is evaluated only once at the beginning of the execution of
the UNSTRING statement.
In OS/VS COBOL with LANGLVL(1), when the DELIMITED BY ALL phrase of UNSTRING is specified,
two or more contiguous occurrences of any delimiter are treated as if they were only one occurrence.
As much of the first occurrence as will fit is moved into the current delimiter receiving field (if
specified). Each additional occurrence is moved only if the complete occurrence will fit. For more
information about the behavior of this phrase in OS/VS COBOL, see the IBM VS COBOL for OS/VS.
In Enterprise COBOL, one or more contiguous occurrences of any delimiters are treated as if they are
only one occurrence, and this one occurrence is moved to the delimiter receiving field (if specified).
For example, if ID-SEND contains 123**45678**90AB:
OS/VS COBOL with LANGLVL(2) and Enterprise COBOL will produce this result:
UPSI switches
OS/VS COBOL allowed references to UPSI switches and mnemonic names associated with UPSI.
Enterprise COBOL allows condition-names only.
For example, if a condition-name is defined in the SPECIAL-NAMES paragraph, the following code
examples have the same effect:
SPECIAL-NAMES. SPECIAL-NAMES.
UPSI-0 IS MNUPO UPSI-0 IS MNUPO
ON STATUS IS UPSI-0-ON
OFF STATUS IS UPSI-0-OFF
. . . . . .
PROCEDURE DIVISION PROCEDURE DIVISION
. . . . . .
IF UPSI-0 = 1 ... IF UPSI-0-ON ...
IF MNUPO = 0 ... IF UPSI-0-OFF ...
01 FIELD-A.
02 LAST-YEAR PIC XX VALUE 87.
02 THIS-YEAR PIC XX VALUE 88.
02 NEXT-YEAR PIC XX VALUE 89.
Enterprise COBOL does not accept this language extension. Therefore, to correct the above example,
you should code alphanumeric values in the VALUE clauses, as in the following example:
01 FIELD-A.
02 LAST-YEAR PIC XX VALUE "87".
02 THIS-YEAR PIC XX VALUE "88".
02 NEXT-YEAR PIC XX VALUE "89".
MM/DD/YYhh.mm.ss (MONTH/DAY/YEARhour.minute.second)
Restriction: With Enterprise COBOL, channel skipping is only supported with references to SPECIAL-
NAMES.
CCCA can automatically convert WRITE . . . AFTER POSITIONING statements. For example, given the
following statement:
82 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
If n is a literal, CCCA would change the above example to WRITE...AFTER ADVANCING n LINES. If
n is an identifier, SPECIAL-NAMES are generated and a section is added at the end of the program.
DATA(24) Use DATA(24) for Enterprise COBOL programs that are compiled with RENT and
mixed with AMODE 24 assembler programs.
DIAGTRUNC Use DIAGTRUNC to get numeric truncation flagging for MOVE statements. This is
similar to the flagging in OS/VS COBOL.
NOSTGOPT Use NOSTGOPT if you have unreferenced data items as eye-catchers or time/
version stamps in WORKING-STORAGE. Use STGOPT only if you do not need
unused data items, or the unused data items are defined with the VOLATILE
clause.
NUMPROC Use NUMPROC(NOPFD) plus the installation option NUMCLS(ALT) if you were
using the USERMOD shipped with OS/VS COBOL. With the USERMOD, characters
A, B, and E (as well as C, D, and F) are considered valid numeric signs in the
COBOL numeric class test. For other alternatives for sign representation, see the
Enterprise COBOL for z/OS Programming Guide.
OUTDD(ddname) Use this option to override the default ddname (SYSOUT) for SYSOUT output that
goes to the system logic output unit. If the ddname is the same as the Language
Environment MSGFILE ddname, the output is routed to the ddname designated
for MSGFILE. If the ddname is not the same as the Language Environment
MSGFILE ddname, the output from the DISPLAY statement is directed to the
OUTDD ddname destination. If the ddname is not present at first reference,
dynamic allocation will take place with the default name and attributes that are
specified by Language Environment.
PGMNAME(COMPAT) Use PGMNAME(COMPAT) to ensure that program names are processed in a
manner compatible with OS/VS COBOL.
Table 14. OS/VS COBOL compiler options not supported by Enterprise COBOL
OS/VS COBOL option Enterprise COBOL equivalent
BATCH/NOBATCH Batch environment is always available (sequence of programs). CBL
statements are always processed with Enterprise COBOL.
Enterprise COBOL considerations for sequence of programs are described
in the Enterprise COBOL for z/OS Programming Guide.
86 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 14. OS/VS COBOL compiler options not supported by Enterprise COBOL (continued)
OS/VS COBOL option Enterprise COBOL equivalent
SYMDMP/ NOSYMDMP ABEND dumps and dynamic dumps are available through Language
Environment services. Symbolic dumps are available through using the
TEST compiler option.
SXREF/NOSXREF The XREF option provides sorted SXREF output.
VBSUM/NOVBSUM Function is available with the VBREF compiler option.
CDECK/NOCDECK The LISTER feature is not supported.
FDECK/NOFDECK The LISTER feature is not supported.
LCOL1/LCOL2 The LISTER feature is not supported.
LSTONLY/LSTCOMP NOLST The LISTER feature is not supported.
L120/L132 The LISTER feature is not supported.
OSDECK With Enterprise COBOL, the object deck runs only in the z/OS environment,
not z/VM®. The OSDECK function is not supported.
01 VAR-LEN-PARENT-A.
02 VAR-LEN-GROUP-A.
03 ODO-OBJECT PIC 99 VALUE 5.
03 OCCURS-SUBJECT OCCURS 10 TIMES DEPENDING ON ODO-OBJECT.
04 TAB-ELEM PIC X(4).
02 VAR-LOC-ITEM PIC XX.
01 NEXT-GROUP.
Group VAR-LEN-GROUP-B contains an ODO object and an OCCURS subject and is not followed by a
variably located data item. VAR-LOC-ITEM follows the OCCURS subject, but does not follow VAR-LEN-
GROUP-B.
01 VAR-LEN-PARENT-B.
02 VAR-LEN-GROUP-B.
03 ODO-OBJECT PIC 99 VALUE 5.
03 OCCURS-SUBJECT OCCURS 10 TIMES DEPENDING ON ODO-OBJECT.
04 TAB-ELEM PIC X(4).
03 VAR-LOC-ITEM PIC XX.
01 NEXT-GROUP.
90 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
MOVE ALL SPACES TO VAR-LEN-GROUP-B(1:).
In the above examples, MOVE ALL SPACES TO VAR-LEN-GROUP-A (1:) would give the same results
with any NOCMPR2 program (VS COBOL II 1.3.x, VS COBOL II 1.4, or Enterprise COBOL). They all use the
actual length in this case.
MOVE ALL SPACES TO VAR-LEN-GROUP-B (1:) would give different results for the following
programs compiled with NOCMPR2:
• VS COBOL II 1.3.x uses the actual length of the group as defined by the current value of the ODO object
(the actual length of the group is set to spaces using the ODO object value).
• VS COBOL II 1.4 and Enterprise COBOL use the maximum length of the group (the entire data item is set
to spaces using the ODO object value).
If a program contains a reference-modified, variable-length group receiver that contains its own ODO
object and is not followed by variably located data and whose reference modifier does not have a length
specified, the following message is issued:
IGYPS2298-I
The reference to variable-length group "data name" will be evaluated using the maximum length of
the group. Execution results might differ from VS COBOL II 1.3.x.
ACCEPT statement
One additional difference between later releases and VS COBOL II 1.3.0 involves the system input devices
for the mnemonic-name suboption of the ACCEPT statement.
For VS COBOL II 1.3.0 only, an input record of 80 characters is assumed even if a logical record length
of other than 80 characters is specified. For VS COBOL II 1.3.1 through 1.4.0, an input record of 256
characters is assumed even if a logical record length of other than 80 characters is specified.
In Enterprise COBOL, the maximum logical record length allowed is 32,760 characters.
You can use CCCA to convert the reserved words automatically. For more information about the CCCA
tool, see Appendix C, “Conversion tools for source programs,” on page 279.
CCCA is updated for reserved word conversions for Enterprise COBOL 5.1 by the PTF for APAR PM86253.
For Enterprise COBOL 5.2, CCCA is updated for reserved word conversions by the PTF for APAR PI32750.
For Enterprise COBOL 6.1, CCCA is updated for reserved word conversions by the PTF for APAR PI55980.
The following table shows the reserved words added to each subsequent release of COBOL. For a
complete list of reserved words, see Appendix B, “COBOL reserved word comparison,” on page 255.
92 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
In COBOL compilers that supported the NOCMPR2 compiler option before Enterprise COBOL 4, it was
possible to use COBOL simulated variable-length RRDS using a VSAM KSDS when you used the SIMVRD
runtime option support.
The coding that you use in a COBOL program to identify and describe VSAM variable-length RRDS and
COBOL simulated variable-length RRDS is similar. With Enterprise COBOL 4 you must use VSAM variable-
length RRDS support. In general, the only action to migrate from COBOL simulated variable-length RRDS
to VSAM variable-length RRDS support is to change the IDCAMS definition of the file.
avg
Is the average size of the COBOL records; strictly
less than m.
m
Is greater than or equal to the maximum size COBOL
record + 4.
In step 2 for simulated variable-length RRDS, coding other language elements that implied a variable-
length record format did not give you COBOL simulated variable-length RRDS. For example, the following
elements alone did not cause the use of simulated variable-length RRDS access, and therefore did not
require the SIMVRD runtime option:
• Multiple FD records of different lengths
• OCCURS . . . DEPENDING ON in the record definitions
• RECORD CONTAINS integer-1 TO integer-2 CHARACTERS
Use the REUSE IDCAMS parameter for files that contain records and that you will open for output.
• Define the file with the ORGANIZATION IS RELATIVE clause.
• Use FD entries to describe the records with variable-length sizes.
• Use the NOSIMVRD runtime option.
• Define the VSAM file through access-method services as an RRDS.
Errors: When you work with simulated variable-length relative data sets and true VSAM RRDS data sets,
an OPEN file status 39 occurs if the COBOL file definition and the VSAM data-set attributes do not match.
For more reference information about the commands for using variable-length RRDS, see z/OS DFSMS:
Access Method Services for Catalogs.
Table 17. Key Enterprise COBOL compiler options for VS COBOL II programs
Enterprise COBOL
compiler options Comments
PGMNAME If compiling with Enterprise COBOL, use the PGMNAME(COMPAT) option to
ensure that program names are processed in a manner compatible with VS
COBOL II (and COBOL/370).
TEST The syntax of the TEST option is different in Enterprise COBOL than in VS
COBOL II.
• In Enterprise COBOL 5 and 6.1, The TEST option has suboptions of EJPD
| NOEJPD and SOURCE | NOSOURCE. You can specify whether or not
source file information is stored in the object and whether or not JUMPTO
and GOTO commands are enabled for use with Debug Tool.
TEST without any suboptions gives you TEST(NOEJPD,SOURCE).
• In Enterprise COBOL 6.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).
For more information about the TEST option, see TEST in the Enterprise
COBOL for z/OS Programming Guide.
RES/NORES Enterprise COBOL does not provide the RES/NORES compiler option. If RES or
NORES are encountered, Enterprise COBOL issues an error message.
96 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Prolog format changes
The prolog of an object program is the code that the compiler generates at the entry point of the program.
It also contains data that identifies the program.
Object modules generated by Enterprise COBOL are Language Environment conforming, and thus have
a different prolog format than in VS COBOL II. Existing applications that scan for date and time and
user-level information need to be updated to the new format.
You can compile your programs with the Enterprise COBOL LIST compiler option to generate a listing that
you can use to compare the VS COBOL II format with the Enterprise COBOL format.
100 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• For SEARCH ALL statements in which the search argument is longer than the table key, do one of the
following actions:
– Ensure that any bytes in the argument in excess of the key length are spaces or zeroes as appropriate.
Tip: When you have completed this investigation and if you decided not to change your programs, you
can change the severity of IGYPG3188-W and IGYPG3189-W, to IGYPG3188-I and IGYPG3189-I,
respectively, or suppress these messages entirely, by using the MSGEXIT suboption of the EXIT
compiler options. This allows your programs to then compile with RC=0. The sample user exit
IGYMSGXT has sample code in it to change the severity of IGYPG3188-W and IGYPG3189-W.
– Move the argument to a temporary data item of the same size as the key and use the temporary item
as the search argument.
– Limit the range of the comparison with reference-modification. For example:
- in the alphanumeric case of search argument 01 ARG PIC X(6) and key of 05 MY-KEY PIC
X(4) use this:
- in the numeric case of search argument 01 ARG PIC 9(6) and array key of 05 MY-KEY PIC
9(4) use this:
The second and third actions above will prevent the warning message in the future.
• For SEARCH ALL statements in which the search argument is signed and the table key is unsigned,
ensure that the search argument is correctly initialized to a positive value before the SEARCH statement
is run. Depending on the specific application logic in the COBOL program, it might be possible to make
one of the following changes:
– Change the data description of the argument to be unsigned.
– Move the search argument to a temporary variable with no sign and use the temporary variable in the
SEARCH ALL statement.
Either action will prevent the warning message in the future.
avg
Is the average size of the COBOL records; strictly
less than m.
m
Is greater than or equal to the maximum size COBOL
record + 4.
In step 2 for simulated variable-length RRDS, coding other language elements that implied a variable-
length record format did not give you COBOL simulated variable-length RRDS. For example, the following
elements alone did not cause the use of simulated variable-length RRDS access, and therefore did not
require the SIMVRD runtime option:
• Multiple FD records of different lengths
• OCCURS . . . DEPENDING ON in the record definitions
• RECORD CONTAINS integer-1 TO integer-2 CHARACTERS
Use the REUSE IDCAMS parameter for files that contain records and that you will open for output.
• Define the file with the ORGANIZATION IS RELATIVE clause.
• Use FD entries to describe the records with variable-length sizes.
• Use the NOSIMVRD runtime option.
• Define the VSAM file through access-method services as an RRDS.
Errors: When you work with simulated variable-length relative data sets and true VSAM RRDS data sets,
an OPEN file status 39 occurs if the COBOL file definition and the VSAM data-set attributes do not match.
For more reference information about the commands for using variable-length RRDS, see z/OS DFSMS:
Access Method Services for Catalogs.
102 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
New reserved words in Enterprise COBOL
Enterprise COBOL has a few more reserved words than IBM COBOL. If your IBM COBOL programs use
these reserved words as user-defined words, then they must be changed before you can compile your
programs with Enterprise COBOL.
You can use CCCA to convert the reserved words automatically. For more information about the CCCA
tool, see Appendix C, “Conversion tools for source programs,” on page 279.
CCCA is updated for reserved word conversions for Enterprise COBOL 5.1 by the PTF for APAR PM86253.
For Enterprise COBOL 5.2, CCCA is updated for reserved word conversions by the PTF for APAR PI32750.
For Enterprise COBOL 6.1, CCCA is updated for reserved word conversions by the PTF for APAR PI55980.
The following table shows the reserved words added to each subsequent release of COBOL. For a
complete list of reserved words, see Appendix B, “COBOL reserved word comparison,” on page 255.
You need to take some actions for certain programs that have SEARCH ALL statements and that were
compiled with one of the following compilers:
• COBOL for OS/390 & VM
• COBOL for MVS & VM
• COBOL/370
The new behavior for the SEARCH ALL statement is described in “Upgrading programs that have SEARCH
ALL statements” on page 99.
104 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
NOCMPR2
We use NOCMPR2 to refer to the language and behavior of programs compiled and run with:
• VS COBOL II, 1.3 or 1.4, with the NOCMPR2 compiler option
• IBM COBOL with the NOCMPR2 compiler option
• Enterprise COBOL
FLAGMIG
We use FLAGMIG to refer to the use of a pre-Enterprise COBOL compiler (VS COBOL II or IBM COBOL)
that supports the CMPR2 and FLAGMIG options.
Tip: To aid you with migration to Enterprise COBOL, use a previous COBOL compiler that supports
FLAGMIG and CMPR2 to flag the statements that need to be converted.
The language elements listed below are affected by the CMPR2/NOCMPR2 compiler option. The
differences are explained in the sections that follow.
CMPR2
The ALPHABET clause does not include the keyword ALPHABET. In fact, ALPHABET is not a reserved
word.
For example:
SPECIAL-NAMES.
ALPHA-NAME IS STANDARD-1.
NOCMPR2
The ALPHABET clause requires the use of the keyword ALPHABET. ALPHABET is now a reserved keyword.
For example:
SPECIAL-NAMES.
ALPHABET ALPHA-NAME IS STANDARD-1.
Messages
Compiling the program with the CMPR2 and FLAGMIG compiler options generates the following message
for each ALPHABET clause of the SPECIAL-NAMES paragraph:
IGYDS1190-W
**MIGR** Alphabet-name must be preceded by the keyword "ALPHABET" under the "NOCMPR2"
compiler option.
106 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
ALPHABETIC class
Whether the ALPHABETIC class includes the 26 lowercase letters depends on the setting of the CMPR2/
NOCMPR2 option.
CMPR2
The ALPHABETIC class of characters defined by the ALPHABETIC class test consists of the 26 uppercase
letters and the space. The 26 lowercase letters are not considered alphabetic.
For example:
NOCMPR2
The ALPHABETIC class of characters defined by the ALPHABETIC class test consists of the 26 uppercase
letters, the 26 lowercase letters, and the space.
For example:
Messages
Compiling the program with the CMPR2 and FLAGMIG compiler options generates the following message
for each ALPHABETIC class test:
IGYPS2221-W
**MIGR** The alphabetic class has been expanded to include lowercase letters under the "NOCMPR2"
compiler option.
CALL . . . ON OVERFLOW
Whether the ON OVERFLOW condition is raised for errors other than "out of storage" errors depends on
the setting of the CMPR2/NOCMPR2 option.
CMPR2
Under CMPR2, the ON OVERFLOW condition exists if the available portion of object time memory cannot
accommodate the program specified in the CALL statement. CMPR2 interpreted that definition to cover
only the condition "not enough storage available to load the program."
Only errors that occur on the actual LOAD of the called program raise the ON OVERFLOW condition. Errors
occurring after the program has been loaded and has started execution do not raise the condition.
NOCMPR2
Under NOCMPR2, the ON OVERFLOW condition exists if the program specified by the CALL statement
cannot be made available for execution at that time.
NOCMPR2 implements 85 COBOL Standard rules and defines the ON OVERFLOW condition to handle any
"recoverable" condition that may prevent the called program from being made available.
Only errors that occur on the actual LOAD of the called program raise the ON OVERFLOW condition. Errors
occurring after the program has been loaded and started execution do not raise the condition.
The assumption is that for some executions of this program, SUBPROGA and SUBPROGB might not fit into
available storage at the same time. The ON OVERFLOW phrase is used to react to this situation, and to
release the storage occupied by the other subprogram.
Running under CMPR2, the ON OVERFLOW condition will be raised only for the "out of storage" errors, and
the approach above is reasonable.
Running under NOCMPR2, the ON OVERFLOW condition might be raised for errors other than the "out of
storage" errors, and therefore, the second call (inside the ON OVERFLOW phrase) might fail as well.
CMPR2
Under CMPR2, the numeric or algebraic value of a scaled numeric item is used in comparison operations
with nonnumeric items. In determining the algebraic value, all symbols P in the PICTURE character-string
are included in the total number of digits, and zeros are used in their place.
NOCMPR2
Under NOCMPR2, the actual character representation or character value of the scaled numeric item is
used in comparison operations with nonnumeric items. The character value for scaled numeric items does
not include any digit positions specified with the symbol P. These digit positions are ignored and not
counted in the size of the operand.
108 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
For example:
CMPR2 NOCMPR2
In this example, under NOCMPR2, the character value of NUM has only two digit positions. When it is
compared to a nonnumeric item of unequal length as in ALPHA2, the shorter operand (NUM) is padded
with enough blanks to equal the length of the other operand.
Messages
Compiling a program with the CMPR2 and FLAGMIG options will cause the compiler to issue the following
message for all comparisons between scaled integers and nonnumeric items.
IGYPG3138-W
**MIGR** The comparison between the scaled integer item " " and the nonnumeric item " " will be
performed differently under the "NOCMPR2" compiler option.
01 CHARVAL.
05 NUM PIC 99PP VALUE 2300.
05 FILLER PIC XX VALUE "00".
CMPR2
Under CMPR2, library text and COPY ... REPLACING statements can contain operands consisting of non-
COBOL characters.
NOCMPR2
85 COBOL Standard disallows all non-COBOL characters and adds lowercase and the colon to the
character set.
The previous example would locate all instances of "abc" and replace it with "XYZ". In contrast, Enterprise
COBOL will treat lowercase and uppercase characters as equivalent in data-names and replace all
instances of "abc" as well as "ABC" with "XYZ". If member A contains:
1 abc PIC X.
1 ABC PIC XX.
CMPR2 NOCMPR2
Message
The difference in behavior is flagged by the FLAGMIG compiler option.
IGYLI0161-W
**MIGR** Lowercase character " " found in column " " will be treated the same as its uppercase
equivalent under the "NOCMPR2" compiler option. Results may be different.
COPY A REPLACING == A == BY == X ==
== B == BY == Y ==
== A:B == BY == Z ==.
If member A contains:
These are the differences between CMPR2 and Enterprise COBOL after COPY ... REPLACING has been
performed.
CMPR2 NOCMPR2
Because ":" is a separator under Enterprise COBOL, "A:B" is broken up into three separate tokens: "A" ":"
and "B." The replacements for A and B are made first.
Message
This difference in behavior between the two releases is flagged by FLAGMIG.
110 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
IGYLI0160-W
**MIGR** The colon will be treated as a separator under the "NOCMPR2" compiler option. Results
may be different.
% XDATA PIC X.
Message
This difference in behavior between the two releases is flagged by FLAGMIG.
IGYLI0162-W
**MIGR** Non-COBOL character "%" found in column 8 will be diagnosed under the "NOCMPR2"
compiler option. Results may be different.
CMPR2
National extension characters @, #, and $ are allowed in the text-name and library-name of the COPY
statement. For example in COPY X$3. the item will be copied.
NOCMPR2
The compiler will issue an E-level diagnostic message.
Message
The difference in behavior is flagged by FLAGMIG.
IGYLI0115-W
**MIGR** The name "X$3" did not follow the rules for formation of a program-name. It will be
diagnosed under the "NOCMPR2" compiler option.
Corrective action for the COPY statement that uses national extension characters:
You should change all national extension characters in your source programs and COPY libraries, to
COBOL characters.
CMPR2
File status codes based on the 74 COBOL Standard are returned with CMPR2.
NOCMPR2
The file status codes are enhanced with NOCMPR2. New and changed file status codes are returned, and
more detail is provided about the status of input-output operations. In addition, problems are detected
earlier in some cases, and there are updated definitions and file status conditions for "missing" files.
Message
A program that contains a file status data-name will receive the following message when compiled with
the CMPR2 and FLAGMIG compiler options:
IGYGR1188-W
**MIGR** The file status values are different under the "NOCMPR2" compiler option.
112 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 22. QSAM and VSAM file status codes with CMPR2 and NOCMPR2
00 00 00 00
04 04
05 05
14 07
24 39
35 44
39
44
02 02
10 10 10 10
21 21
22 22
23 23
24 24
30 30 30 30
39 39
34 34
90 37 90 35
90 37
90
91 91
92 38 92 38
41 41
42 42
43 43
44 46
47 47
48 48
49 49
92 92
93 93
94 46
95 39
95
96 96
97 97
CMPR2
In CMPR2 programs, fixed-file attribute checking is only done at READ/WRITE time, if done at all. An
OPEN statement could succeed even if some fixed-file attributes were inconsistent. For example, an
OPEN could succeed with different record sizes in:
• RECORD CONTAINS x clause
• JCL DCB=(LRECL=y)
• Actual data-set label
NOCMPR2
In NOCMPR2 programs, 85 COBOL Standard requires that fixed-file attribute checking be done in many
cases. As a result, a program with inconsistent fixed file attributes might fail at OPEN time rather than
have problems later. The OPEN could fail with either runtime message IGZ0035S or file status 39 (if a file
status clause is specified). See Appendix G, “Preventing file status 39 for QSAM files,” on page 325 for
more information about preventing file status 39 for QSAM files.
A common source of fixed file attribute inconsistency problems is the DCB= parameter of the JCL DD
statement for your file.
Messages
There are no **MIGR** messages for these differences, because fixed-file attributes can be specified
outside of the source program.
114 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
– Do not code a BLKSIZE value in the JCL DD statement.
• For existing blocked data sets, use the existing file block size:
– Code BLOCK CONTAINS 0 in your source program or use the BLOCK0 compiler option.
– Do not code a BLKSIZE value in the ddname definition.
The one case where you might consider putting BLKSIZE in the JCL is if you require a specific block size
for a new file and you need the flexibility to modify that block size without recompiling your program. In
this case, follow these guidelines:
• Code BLOCK CONTAINS 0 in your source program or use the BLOCK0 compiler option.
• Code a BLKSIZE value in the ddname definition (DCB=(BLKSIZE=xxx) in the JCL DD statement).
CMPR2
Under CMPR2, if a program does not contain any of the statements above, a compiler warning diagnostic
message is issued to suggest that you should analyze the program to verify that it could exit.
Suppose that this is the last line in the program:
In this case, the compiler diagnostic message would not be issued, and the following runtime message
would be issued only if the IF condition tested false:
IGZ0037S
The flow of control in program "program-name" proceeded beyond the last line of the program.
NOCMPR2
Under NOCMPR2, all programs are assumed to end with an EXIT PROGRAM statement. For a called
subprogram, then, control can no longer flow beyond the last line of the program, but instead, the
program will return to the calling program. In the preceding example, where the program ended with the
statement:
a false test will cause control to be returned to the caller. With CMPR2 behavior, the result is an abend.
For a main program, the EXIT PROGRAM statement has no effect. Therefore, the implicit EXIT PROGRAM
that is generated by the compiler will have no effect on the execution of the program; a main program that
executes beyond the last line of the program will still abend.
Messages
A program that does not contain a STOP RUN, GOBACK, or EXIT PROGRAM statement will receive the
following diagnostic message:
IGYPS2091-W
No "STOP RUN", "GOBACK" or "EXIT PROGRAM" was found in the program. Check program logic to
verify that the program will exit.
Also, if the CMPR2 and FLAGMIG compiler options are used, the following message will be issued:
IGYPS2223-W
**MIGR** An implicit "EXIT PROGRAM" will be executed at the end of this program under the
"NOCMPR2" compiler option.
CMPR2
The fixed file attributes for QSAM files do not need to match between COBOL program file definition, JCL,
or data-set label for a successful file OPEN.
NOCMPR2
If the following items are inconsistent, an OPEN statement in your program might not run successfully:
• The fixed file attributes of a file from the data set label
• The fixed file attributes specified in the JCL DD statement for a file
• The attributes specified for that file in the SELECT and FD statements of your COBOL program
Inconsistencies in the attributes for file organization, record format (fixed or variable), the code set, or
record length result in a file status code 39, and the OPEN statement fails.
Message
There are no **MIGR** messages for this difference, because fixed-file attributes can be specified outside
of the source program.
Corrective action for OPEN statement failing for QSAM files (FILE STATUS 39)
To prevent common file status 39 problems, see Appendix G, “Preventing file status 39 for QSAM files,”
on page 325.
116 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
OPEN statement failing for VSAM files (FILE STATUS 39)
There is a difference in the way CMPR2 and NOCMPR2 handle RECORDSIZE defined in VSAM files
associated with IDCAMS.
In CMPR2, the RECORDSIZE defined in your VSAM files associated with IDCAMS was not required to
match your COBOL program file definition for successful file OPEN.
CMPR2
The RECORDSIZE defined in your VSAM files associated with IDCAMS was not required to match your
COBOL program file definitions for successful file OPEN.
NOCMPR2
The RECORDSIZE defined in your VSAM files associated with IDCAMS are required to match the file
definitions for those files in your COBOL program for successful file OPEN.
Message
There are no **MIGR** messages for this difference, because the VSAM RECORDSIZE attribute is outside
of the source program.
Corrective action for OPEN statement failing for VSAM files (FILE STATUS 39)
Change your program file definitions or the RECORDSIZE defined in your VSAM files associated with
IDCAMS to match according to the following table. The following rules apply to VSAM ESDS, KSDS, and
RRDS file definitions:
PERFORM A
STOP RUN.
A. DISPLAY "Hi".
B. DISPLAY "there".
After displaying the message "Hi," compiler-generated code will cause the flow of control to return to
the STOP RUN statement after performing paragraph A. Without this, control would fall through into
paragraph B.
This code mechanism is reset to an initial state the first time a program is called or when a program is
cancelled. Under NOCMPR2, it is also reset every time a program is called. Under CMPR2, the mechanism
retains its last-used state when a program is called twice in succession without having been cancelled.
IF FIRST-TIME-CALLED THEN
PERFORM A
MOVE ZERO TO N
ELSE
SUBTRACT 1 FROM N
GO TO A.
GOBACK.
A. IF N > 1 THEN
GOBACK.
B. DISPLAY "Processing continues...".
The program is passed a switch, FIRST-TIME-CALLED, which tells the program whether or not the
program has been called without having been cancelled. It is also passed a variable, N.
CMPR2
When the program is called for the first time, the PERFORM statement will be executed. If the "N > 1" test
succeeds, the program will return to the calling program.
However, this means that the PERFORM statement has not reached normal completion because
paragraph A never returned to the point from which it was performed. The compiler-generated
mechanism at the end of paragraph A is still "set" to return back to the PERFORM statement.
Thus, on the second call to the program, the ELSE path will be taken, 1 will be subtracted from N, and
control will be transferred by the GO TO statement to paragraph A. However, if the test "N > 1" fails, the
PERFORM mechanism is still set. So, when the end of paragraph A is reached, instead of falling through
into paragraph B, control is "returned" to the MOVE statement after the PERFORM statement.
These results might not be intended. The problem might occur whenever all of the following conditions
occur:
1. The program returns to the calling program with an EXIT PROGRAM or GOBACK statement.
2. A PERFORM statement performs a paragraph or a range of paragraphs, and those paragraphs might
also be reached by a GO TO statement or by falling through into the paragraph.
3. All such PERFORM statements have not had a chance to return prior to the execution of the EXIT
PROGRAM or GOBACK statement.
NOCMPR2
Under NOCMPR2, when the program is called for the first time, the PERFORM statement will be executed
and control will flow to paragraph A. Then, depending on the result of the test "N > 1," the program will
either immediately return to the calling program, or it will return to the PERFORM, move zero to N, and
then return to the calling program.
On subsequent calls to the program, the ELSE path will be taken, 1 will be subtracted from N, and then
control will be transferred by the GO TO statement to paragraph A. Then, depending on the result of
the test "N > 1," the program will either immediately return to the calling program or fall through into
paragraph B, display a message, and continue.
Regardless of the paths taken, the mechanism that controls the PERFORM statement will be reset each
time the program is called and no irregular control flow will take place.
Messages
A program that contains an out-of-line PERFORM, and either an EXIT PROGRAM or GOBACK statement,
will receive the following messages when compiled with the CMPR2, FLAGMIG, and NOOPTIMIZE
compiler options:
118 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
IGYPA3205-W
**MIGR** "EXIT PROGRAM" or "GOBACK" statements assume that ends of "PERFORM" ranges were
reached under the "NOCMPR2" compiler option. This program may have different execution results
after migration if used as a subprogram.
IGYPA3206-W
**MIGR** For more information about ends of "PERFORM" ranges, recompile with the "OPTIMIZE"
and "FLAGMIG" compiler options. If no messages about ends of "PERFORM" ranges are issued, then
this program will not have a migration problem with ends of "PERFORM" ranges.
Upon re-compilation with the OPTIMIZE compiler option, the absence of any such messages indicates
that the program will not have any problem with an EXIT PROGRAM or GOBACK statement being executed
within the range of an out-of-line PERFORM statement, while the presence of the following messages
indicates otherwise:
IGYOP3205-W
**MIGR** "EXIT PROGRAM" or "GOBACK" statements assume that ends of "PERFORM" ranges were
reached under the "NOCMPR2" compiler option. This program may have different execution results
after migration if used as a subprogram.
IGYOP3092-W
An "EXIT PROGRAM" or a "GOBACK" statement was encountered in the range of the "PERFORM"
statement at "PERFORM (LINE xx.xx)". Re-entry of the program may cause unexpected control flow.
CMPR2
Within the VARYING ... AFTER phrase of the PERFORM statement under CMPR2, id-5 is set before id-2 is
augmented.
When varying two variables under CMPR2, at the intermediate stage when the inner condition is true,
the inner variable (id-5) was set to its current FROM value (id-6) before the outer variable (id-2) was
augmented with its current BY value (id-4).
NOCMPR2
However, under NOCMPR2, id-2 is augmented before id-5 is set. This change creates an incompatibility
when id-6 is dependent on id-2.
Consider the following example:
In this example, id-6 (X) is dependent on id-2 (X) because they are identical.
Under CMPR2, PARA3 will be executed eight times with the following values:
Under NOCMPR2, PARA3 will be executed six times with the following values:
X: 1 1 1 2 2 3
Y: 1 2 3 2 3 3
A dependency between identifiers occurs if the first identifier is identical to, subscripted with, a partial or
full redefinition of, or variably located depending on the second identifier.
Message
First, recompile all programs under an earlier COBOL compiler with the CMPR2 and FLAGMIG compiler
options. This will flag any PERFORM ... VARYING statements that have dependencies between the
following variables:
• id-6 is (potentially) dependent on id-2
• id-9 is (potentially) dependent on id-5
• id-4 is (potentially) dependent on id-5
• id-7 is (potentially) dependent on id-8
Only PERFORM ... VARYING with the AFTER phrase is affected.
For example, compiling the program under an earlier COBOL compiler with the CMPR2 and FLAGMIG
compiler options causes the compiler to issue the following message when id-6 is dependent on id-2:
IGYPA3209-W
**MIGR** "PERFORM ... VARYING" operand "ID-6 (NUMERIC INTEGER)" was dependent on "ID-2
(NUMERIC INTEGER)". Under the "NOCMPR2" compiler option, the rules for augmenting/setting
"PERFORM ... VARYING" operands have changed, and this statement may have incompatible results.
PERFORM xx
VARYING id-2 FROM id-3 BY id-4 UNTIL cond-1
AFTER id-5 FROM id-6 BY id-7 UNTIL cond-2
AFTER id-8 FROM id-9 BY id-10 UNTIL cond-3.
is converted into:
This example assumes that all id-x are identifiers. If any are index-names, then SET statements must be
used in place of MOVE statements.
120 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
The example above is a worst-case conversion. It could be refined by changing only the parts of the
statement that use those identifiers for which a dependency (potentially) exists. For example, if only id-6
is dependent on id-2 and no other dependency exists, the conversion above can be reduced to:
CMPR2
Under CMPR2, a data item with the symbol B in its PICTURE clause is an alphabetic data item.
NOCMPR2
Under NOCMPR2, a data item with the symbol B in its PICTURE clause is an alphanumeric-edited item.
Most functions do not pose a problem with this change. However, there are a few subtleties that you
should watch for when upgrading from CMPR2 to Enterprise COBOL, relating to the INITIALIZE, STRING,
CALL and CANCEL statements.
Message
If a program is compiled with the CMPR2 and FLAGMIG options, a message is issued for any alphabetic
items that had been defined with the symbol B.
IGYDS1105-W
**MIGR** A "PICTURE" clause was found consisting of symbols "A" and "B". This alphabetic item will
be treated as an alphanumeric-edited item under the "NOCMPR2" compiler option.
INITIALIZE statement
Consider the following example:
A statement like this coded under CMPR2 is valid and initialization will take place. However, this
statement gives the following warning message under NOCMPR2, and no initialization will take effect:
IGYPS2047-W
"INITIALIZE" statement receiver "ALPHA" was incompatible with the data category(s) of the
"REPLACING" operand(s). "ALPHA" was not initialized.
This incompatibility can also happen when a group of items are being initialized. Under NOCMPR2, ALPHA
above would be classified as alphanumeric-edited. If ALPHA was defined in a group that was to be
initialized, a message like the one above would be issued only if there were no alphabetic items to be
initialized. Thus, in the following example, ALPHA is never initialized, but no message alerts you to that
fact.
01 GROUP1.
05 ALPHA PIC AABAA.
In the second example, which shows a group of possibly mixed types, INITIALIZE should be
supplemented with an additional phrase. For example:
Important: Adding this extra phrase could cause conflicts if you already specified this phrase but used
different replacing data or if you had other alphanumeric-edited items within the group that you did not
want initialized.
STRING statement
With either CMPR2 or NOCMPR2, alphabetic items are allowed to be the STRING...INTO receiving field.
However, edited items are not allowed. Therefore, if any CMPR2 programs have an alphabetic item
defined with the symbol B in this position of the STRING statement, these statements will get a severe
error message from Enterprise COBOL because this item is reclassified as alphanumeric-edited.
IGYPA3104-S
"STRING INTO" identifier "ALPHA (ALPHANUMERIC-EDITED)" was an edited data item or was defined
with the "JUSTIFIED" clause. The statement was discarded.
BETA is redefined on ALPHA and has a length equal to ALPHA, including all symbols of B. BETA is then
used in the STRING statement. After STRING is executed, ALPHA will have the same value as it did with
CMPR2.
122 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
items defined with the symbol B will get a severe error message. For example, the following program
would have worked with CMPR2, but will now get a severe error message:
IGYPA3063-S
"CALL" or "CANCEL" identifier "CALLDN (ALPHANUMERIC-EDITED)" was not alphanumeric, zoned
decimal nor alphabetic. The statement was discarded.
To compile with Enterprise COBOL, change the definition of CALLDN to all alphabetic or alphanumeric or
add a new data-name that redefines CALLDN with a valid data type as shown below.
CMPR2
The PROGRAM COLLATING SEQUENCE established in the OBJECT COMPUTER paragraph is used to
determine the truth value of any nonnumeric comparisons that are:
• Explicitly specified in relation conditions
• Explicitly specified in condition-name conditions
• Implicitly performed as part of the execution of the SORT and MERGE statements, unless overridden by
the COLLATING SEQUENCE phrase on the respective SORT or MERGE statement
• Implicitly performed as part of the execution of STRING, UNSTRING, and INSPECT statements
NOCMPR2
The PROGRAM COLLATING SEQUENCE established in the OBJECT COMPUTER paragraph is used to
determine the truth value of any nonnumeric comparisons that are:
• Explicitly specified in relation conditions
• Explicitly specified in condition-name conditions
• Implicitly performed as part of the execution of the SORT and MERGE statements, unless overridden by
the COLLATING SEQUENCE phrase on the respective SORT or MERGE statement
The native collating sequence is used to determine the truth value of any nonnumeric comparisons that
are implicitly performed as part of the execution of STRING, UNSTRING, and INSPECT statements.
For most applications, this difference will not affect the results of these statements. The implicit
comparisons performed as part of STRING, UNSTRING, and INSPECT statements are always for equality.
Therefore, even if the ordering of the characters in the PROGRAM COLLATING SEQUENCE is different than
that of the native sequence, the results of these comparisons will be the same.
For an application to be affected by this change, the PROGRAM COLLATING SEQUENCE established in the
OBJECT COMPUTER paragraph must identify an alphabet that was defined with the ALSO clause, which
assigns several different characters to the same ordinal position.
Corrective action
No correction that is generally applicable exists for programs receiving this message if the PROGRAM
COLLATING SEQUENCE contains multiple characters assigned to the same ordinal position.
The CMPR2 behavior of affected programs cannot be preserved without extensive and complex recoding.
Such programs must be rewritten to avoid this dependency on the CMPR2 behavior.
CMPR2
Under CMPR2, the length of numeric and numeric-edited record descriptions is calculated by totaling the
number of digit positions in the PICTURE. Other types of record descriptions are assigned a length equal
to the number of bytes occupied by the record description.
NOCMPR2
Under NOCMPR2, the length of each record description is determined to be the number of bytes occupied
by the record description, regardless of whether the record description is numeric, numeric-edited, or
otherwise.
Messages
If the FLAGMIG and CMPR2 compiler options are used, a message will be issued for any READ INTO or
RETURN INTO statement that might be affected.
A program that is affected by the rule change will receive the following message:
IGYPS2281-I
The "INTO" phrase of the "READ" or "RETURN" statement was specified for fixed-format file "file-
name", which contained multiple records. Record "record-name" was selected as the sending field for
the move.
This message will be issued under both the CMPR2 and NOCMPR2 compiler options. Therefore, you can
compile the program with CMPR2, and then with NOCMPR2, and examine the messages to determine
whether the same record was chosen under both CMPR2 and NOCMPR2. If so, then the program need not
be changed.
In addition, with the FLAGMIG compiler option, the following message will be issued:
IGYPS2283-W
**MIGR** The "INTO" phrase of the "READ" or "RETURN" statement was specified for file "file-name",
which contained multiple records. A different record might be selected for the sending field for the
move under the "NOCMPR2" compiler option.
124 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Corrective action for the READ INTO and RETURN INTO phrases:
By applying the record description rules to each qualified file or by checking the messages, you can
determine whether a different record description may be selected under NOCMPR2 than under CMPR2.
For example, consider the following record descriptions:
In this case, each record description is calculated to have a length of "9", under both CMPR2 and
NOCMPR2. Therefore, no incompatibility exists.
Suppose, however, that there is a difference in the way that the record description lengths are calculated.
Consider the following statements:
In this case, under NOCMPR2, each record description is calculated to have a length of "4". However,
under CMPR2, the length of the numeric record description (RECORD-4) is calculated by counting digits,
so its length will be "9" instead of "4". Thus, RECORD-4 will be used as the sending field, even though the
byte length of each record description is 4.
After you have detected an incompatibility, change the code to ensure that the CMPR2 behavior will be
preserved. You can change the READ INTO or RETURN INTO statement to a READ or RETURN statement,
followed by a MOVE statement. The MOVE statement would specify, as a sending field, the required
record description (the "longest" one), and, as a receiving field, the item that had been specified as the
INTO item.
FD FILE1
RECORD CONTAINS 40.
01 F1R1 PIC X(20).
01 F1R2 PIC X(40).
FD FILE2
RECORD CONTAINS 20 TO 40.
01 F2R1 PIC X(20).
01 F2R2 PIC X(40).
CMPR2
Under CMPR2, FILE1 and FILE2 have variable-length records.
NOCMPR2
Under NOCMPR2, FILE1 has fixed-length records and FILE2 has variable-length records.
Message
Compiling the program with the CMPR2 and FLAGMIG options will cause the compiler to issue the
following message for FILE1:
IGYPS1183-W
**MIGR** "RECORD CONTAINS" clause with one integer specified is supported differently under the
"NOCMPR2" compiler option.
SET . . . TO TRUE
SET ... TO TRUE has different effects depending on whether CMPR2 or NOCMPR2 is in effect.
CMPR2
The SET ... TO TRUE statement is performed according to the rules of the MOVE statement.
NOCMPR2
Under NOCMPR2, SET ... TO TRUE follows the rules of the VALUE clause. There are three instances in
which this change can cause different results:
• When the data item is described by a JUSTIFIED clause
• When the data item is described by a BLANK WHEN ZERO clause
• When the data item has editing symbols in its PICTURE string
Message
A program that is potentially affected by this change will receive the following message when compiled
with the CMPR2 and FLAGMIG options:
IGYPS2219-W
**MIGR** The "SET" statement with the "TO TRUE" phrase will be performed according to the rules
for the "VALUE" clause under the "NOCMPR2" compiler option.
JUSTIFIED clause
When a data item described by a JUSTIFIED clause is the receiving item in a MOVE statement, the
sending data is aligned at the rightmost character position in the receiving item. In a VALUE clause,
initialization is not affected by the JUSTIFIED clause. This means that the data in a VALUE clause will be
aligned at the leftmost character position in the receiving item.
Here's how it works under CMPR2:
126 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
01 A PIC X(3) JUSTIFIED RIGHT VALUE "a". (Result = "a ")
88 V VALUE " a".
If the behavior exhibited under CMPR2 is required under NOCMPR2, the data in the VALUE clause for the
88-level item must be adjusted accordingly:
If the behavior exhibited under CMPR2 is required under NOCMPR2, the data in the VALUE clause for the
88-level item must be specified in edited form:
CMPR2
When SIZE ERROR is specified on the MULTIPLY statement example, SIZE ERROR can occur when the
36-digit (immediate) result is moved into the 30-digit (or 31-digit) (intermediate) result, according to the
74 COBOL Standard rules. This differs from the corresponding COMPUTE case, in which SIZE ERROR
cannot occur when the 36-digit (immediate) result is moved into the 30-digit (or 31-digit) (intermediate)
result.
This behavior applies to the DIVIDE statement with its corresponding COMPUTE statement as well.
NOCMPR2
However, under NOCMPR2, SIZE ERROR applies only to final results. In the MULTIPLY example, SIZE
ERROR cannot occur when the 36-digit (immediate) result is moved into the 30-digit (or 31-digit)
(intermediate) result. Consequently, the MULTIPLY and COMPUTE statements become equivalent in this
regard. This behavior also applies to the DIVIDE statement.
Such statements will now be flagged by the following compiler message:
IGYPG3113-W
Truncation of high-order digit positions can occur due to precision of intermediate results exceeding
30-digits.
If, at run time, truncation actually does occur, the following message will be issued:
IGZ0036W
Truncation of high order digit positions occurred in program "program-name" on line number "n".
Message
A program that is potentially affected by this change will receive the following message when compiled
with the CMPR2 and the FLAGMIG options:
IGYPG3204-W
**MIGR** The "ON SIZE ERROR" phrase will not be executed for intermediate results under the
"NOCMPR2" compiler option.
128 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Corrective action for the SIZE ERROR on MULTIPLY and DIVIDE
The CMPR2 behavior of affected programs cannot be preserved without extensive and complex recoding.
Such programs must be rewritten to avoid this dependency on the CMPR2 behavior.
UNSTRING id-1
DELIMITED BY id-2 OR id-3 ...
INTO id-4 DELIMITER IN id-5 COUNT IN id-6
id-7 DELIMITER IN id-8 COUNT IN id-9
WITH POINTER id-10
TALLYING IN id-11
ON OVERFLOW imp-stmt-1
NOT ON OVERFLOW imp-stmt-2
END-UNSTRING
CMPR2
Under CMPR2, any subscripting, indexing, or length calculation associated with id-1, id-10, and id-11
is to be evaluated only once, at the beginning of execution of the UNSTRING statement. However, any
subscripting, indexing, or length calculation associated with id-2, id-3, id-4, id-5, id-6, id-7, id-8, and id-9,
(or any repetitions) is to be evaluated immediately before transfer into the respective data item.
NOCMPR2
Under NOCMPR2, any subscripting, indexing, or length calculation associated with any of id-1 through
id-11 (or any repetitions) is to be evaluated only once, at the beginning of execution of the UNSTRING
statement. This change can lead to different results when certain dependencies exist between id-2
through id-9.
Dependencies involving identifiers id-1, id-10, and id-11 are not affected by this change.
Messages
Most of the UNSTRING statements flagged with messages 3211 through 3214 will generate identical
results. Only certain dependencies between the operands in the UNSTRING statement will generate
different results.
For example, a dependency can exist between two operands (op-1 and op-2) in an UNSTRING statement
in the following ways:
1. op-1 is subscripted, and the subscript value is modified by op-2:
a. The subscript identifier is used as a receiver in an INTO, DELIMITER IN, or COUNT IN operand.
b. The subscript identifier is a variably located item, and an ODO object affecting the location of this
item is used as a receiver in an INTO, DELIMITER IN, or COUNT IN operand.
2. op-1 is a variable-length group item, and an ODO object affecting the length of this group is modified
by op-2:
a. The ODO object is used as a receiver in an INTO, DELIMITER IN, or COUNT IN operand.
3. op-1 is a variably located item, and an ODO object affecting the location of this item is modified by
op-2:
a. The ODO object is used as a receiver in an INTO, DELIMITER IN, or COUNT IN operand.
Dependencies generated by overlapping operands, or by specifying the same identifier as a DELIMITED
BY operand and as one of the sending, INTO, or DELIMITER IN operands are illegal under both Standard
COBOL 74 and 85 COBOL Standard and are not addressed here. Generally, results will be unpredictable.
01 VLG-1.
02 VLG-1-ODOOBJ PIC 9 VALUE IS 5.
02 VLG-1-GR.
03 VLG-1-ODO PIC X OCCURS 1 TO 9 TIMES
DEPENDING ON VLG-1-ODOOBJ.
77 S-1 PIC X(20) VALUE IS ALL "123456789".
UNSTRING S-1
INTO VLG-1
END-UNSTRING
IGYPS2222-W
**MIGR** The maximum length of receiver "vlg-1" will be used under the "NOCMPR2" compiler
option.
Enterprise COBOL will use the maximum length of vlg-1 to determine both the amount of data
extracted from sending item s-1 and the length of the receiving area vlg-1.
Regardless of which identifier is flagged with message 2222, you must replace the identifier with a
reference modified version, as in the following example:
UNSTRING S-1
INTO VLG-1(1:LENGTH OF VLG-1)
END-UNSTRING
This form forces the actual length of vlg-1 at the beginning of the UNSTRING statement to be used.
This correction is not affected by the presence of any of the optional phrases of the UNSTRING
statement (DELIMITED BY, WITH POINTER, ON OVERFLOW) and it applies equally to all flagged
identifiers in any one UNSTRING statement.
IGYPA3211-W
This message will be issued if one of the "DELIMITED BY" identifiers in the UNSTRING statement is
subscripted, refers to a variable-length group item, or refers to a variably located item.
For an UNSTRING statement to be affected by this change, the flagged DELIMITED BY operand must
depend on one of the INTO receivers.
For example:
01 DEL
02 OCC-DEL-1 PIC X OCCURS 9 TIMES.
02 VLEN-DEL-2-ODOOBJ PIC 9 VALUE IS 5.
02 VLEN-DEL-2.
03 VLEN-DEL-2-ODO PIC X OCCURS 1 TO 9 TIMES
DEPENDING ON VLEN-DEL-2-ODOOBJ.
130 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
77 S-1 PIC X(20) VALUE IS ALL "123456789".
77 R-1 PIC X(20) VALUE IS SPACES.
77 R-2 PIC X(20) VALUE IS SPACES.
77 SUB-5 PIC 99 VALUE IS 5.
UNSTRING S-1
DELIMITED BY OCC-DEL-1(SUB-5) OR VLEN-DEL-2,
INTO R-1 DELIMITER IN OCC-DEL-1(SUB-5 + 1)
COUNT IN VLEN-DEL-2-ODOOBJ,
R-2,
END-UNSTRING
IGYPA3211-W
**MIGR** In this "UNSTRING" statement, the subscript or "OCCURS DEPENDING ON" calculations
for the "DELIMITED BY" operand will be done only once under the "NOCMPR2" compiler option.
No corrections are required for items flagged with message 3211.
IGYPA3212-W
This message will be issued if one of the INTO identifiers in the UNSTRING statement is subscripted,
refers to a variable-length group item, or refers to a variably located item.
For an UNSTRING statement to be affected by this change, the flagged INTO identifier must depend
on one of the receivers in a preceding INTO phrase.
For example:
01 REC.
02 R-1 PIC X(20) VALUE IS SPACES.
02 R-2-SUB PIC 9 VALUE IS 9.
02 OCC-R-2-GR.
03 OCC-R-2 PIC X OCCURS 9 TIMES.
02 R-3-ODOOBJ PIC 9 VALUE IS 9.
02 ODO-R-3.
03 FILLER PIC X OCCURS 1 TO 9 TIMES
DEPENDING ON R-3-ODOOBJ.
UNSTRING S-3
DELIMITED BY ALL SPACES,
INTO R-1 COUNT IN R-2-SUB,
OCC-R-2(R-2-SUB) COUNT IN R-3-ODOOBJ,
ODO-R-3,
END-UNSTRING
IGYPA3212-W
**MIGR** In this "UNSTRING" statement, the subscript or "OCCURS DEPENDING ON" calculations
for the "INTO" operand will be done only once under the "NOCMPR2" compiler option.
This UNSTRING statement will generate different results under CMPR2 and NOCMPR2 because the
subscript of the second INTO receiver is modified by the COUNT IN receiver of the first INTO phrase.
In addition, the length of the third INTO receiver is modified by the COUNT IN receiver of the second
INTO phrase.
Under CMPR2, the values that are moved to the COUNT IN identifiers will be used for the subsequent
INTO phrases. Under NOCMPR2, the values in effect at the beginning of the execution of the
UNSTRING statement will be used for all INTO phrases.
Any UNSTRING statement flagged with message 3212 must be broken into multiple UNSTRING
statements. A separate UNSTRING statement must be used for each dependent INTO phrase.
However, be aware of the following rules:
• If the original UNSTRING statement specified a WITH POINTER phrase, that phrase must be
included in all of the changed UNSTRING statements. If the original UNSTRING statement did
not specify a WITH POINTER phrase, that phrase must be added to all the changed UNSTRING
statements, and the POINTER identifier must be initialized to 1.
• If the original UNSTRING statement specified a TALLYING IN phrase, that phrase must be included
in all of the changed UNSTRING statements.
MOVE 1 TO PTR
UNSTRING S-3
DELIMITED BY ALL SPACES,
INTO R-1 COUNT IN R-2-SUB,
WITH POINTER PTR,
END-UNSTRING
UNSTRING S-3
DELIMITED BY ALL SPACES,
INTO OCC-R-2(R-2-SUB) COUNT IN R-3-ODOOBJ,
WITH POINTER PTR,
END-UNSTRING
UNSTRING S-3
DELIMITED BY ALL SPACES,
INTO ODO-R-3,
WITH POINTER PTR,
END-UNSTRING
IGYPA3213-W
This message will be issued if one of the DELIMITER IN identifiers in the UNSTRING statement is
subscripted, refers to a variable-length group item, or refers to a variably located item.
For an UNSTRING statement to be affected by this change, the flagged DELIMITER IN identifier must
depend on one of the receivers in a preceding INTO phrase.
Dependencies between identifiers in the same INTO phrase will not affect the result of the UNSTRING
statement. CMPR2 behavior delays the effects of these dependencies until the next INTO phrase.
For example:
01 DEL.
02 D-2-SUB PIC 9 VALUE IS 9.
02 OCC-D-2-GR.
03 OCC-D-2 PIC X OCCURS 9 TIMES.
02 D-3-ODOOBJ PIC 9 VALUE IS 9.
02 ODO-D-3.
03 FILLER PIC X OCCURS 1 TO 9 TIMES
DEPENDING ON D-3-ODOOBJ.
UNSTRING S-4
DELIMITED BY ALL SPACES,
INTO R-1 COUNT IN D-2-SUB,
R-2 DELIMITER IN OCC-D-2(D-2-SUB)
COUNT IN D-3-ODOOBJ,
R-3 DELIMITER IN ODO-D-3,
END-UNSTRING
IGYPA3213-W
**MIGR** In this "UNSTRING" statement, the subscript or "OCCURS DEPENDING ON" calculations
for the "DELIMITER IN" operand will be done only once under the "NOCMPR2" compiler option.
This UNSTRING statement will generate different results under CMPR2 and NOCMPR2 because the
subscript of the DELIMITER IN identifier of the second INTO phrase is modified by the COUNT IN
receiver of the first INTO phrase. In addition, the length of the DELIMITER IN identifier of the third
INTO phrase is modified by the COUNT IN receiver of the second INTO phrase.
With CMPR2 behavior, the values that are moved to the COUNT IN identifiers will be used for the
subsequent INTO phrases. With NOCMPR2, the values in effect at the beginning of the execution of
the UNSTRING statement will be used for all INTO phrases.
Any UNSTRING statement flagged with message 3213 must be broken into multiple UNSTRING
statements; a separate UNSTRING statement must be used for each dependent INTO phrase.
132 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
With these changes, the previous example becomes:
IGYPA3214-W
This message will be issued if one of the COUNT IN identifiers in the UNSTRING statement is
subscripted or refers to a variably located item.
For an UNSTRING statement to be affected by this change, the flagged COUNT IN identifier must
depend on one of the receivers in a preceding INTO phrase.
Dependencies between identifiers in the same INTO phrase will not affect the result of the UNSTRING
statement; CMPR2 behavior delays the effects of these dependencies to the next INTO phrase.
For example:
01 C-2.
02 C-2-SUB PIC 9 VALUE IS 9.
02 OCC-C-2-GR.
03 OCC-C-2 PIC 9 OCCURS 9 TIMES.
UNSTRING S-5
DELIMITED BY ALL SPACES,
INTO R-1 COUNT IN C-2-SUB,
R-2 COUNT IN OCC-C-2(C-2-SUB),
END-UNSTRING
IGYPA3214-W
**MIGR** In this "UNSTRING" statement, the subscript or "OCCURS DEPENDING ON" calculations
for the "COUNT IN" operand will be done only once under the "NOCMPR2" compiler option.
This UNSTRING statement will generate different results under CMPR2 and NOCMPR2 because the
subscript of the COUNT IN identifier of the second INTO phrase is modified by the COUNT IN receiver
of the first INTO phrase.
With CMPR2 behavior, the values that are moved to the COUNT IN identifier in the first INTO phrase
will be used for the second INTO phrase. With NOCMPR2, the value in effect at the beginning of
execution of the UNSTRING statement will be used.
Any UNSTRING statement flagged with message 3214 must be broken into multiple UNSTRING
statements; a separate UNSTRING statement must be used for each dependent INTO phrase.
With these changes, the example above becomes:
MOVE 1 TO PTR
UNSTRING S-5
DELIMITED BY ALL SPACES,
INTO R-1 COUNT IN C-2-SUB,
WITH POINTER PTR,
END-UNSTRING
UPSI switches
Condition-names for the UPSI switches must be defined and referenced differently depending on whether
CMPR2 or NOCMPR2 is in effect.
CMPR2
UPSI switches can be defined by specifying condition-names for the ON and OFF settings of the switch.
Under CMPR2, the condition-names for all UPSI switches, UPSI-0 through UPSI-7, can be defined with
the same names, as follows:
SPECIAL-NAMES.
UPSI-0 ON STATUS IS T OFF STATUS IS F
UPSI-1 ON STATUS IS T OFF STATUS IS F
⋮
UPSI-7 ON STATUS IS T OFF STATUS IS F
References to the names could be qualified with the UPSI name, as follows:
NOCMPR2
The names of the UPSI switches, UPSI-0 through UPSI-7, can no longer be referenced in the PROCEDURE
DIVISION under NOCMPR2. The statements above will now be flagged with a message of the following
format:
IGYPS2121-S
"T OF UPSI-0" was not defined as a data-name. The statement was discarded.
Message
Using CMPR2 and FLAGMIG, any PROCEDURE DIVISION statement that references an UPSI switch by
name will be flagged with the following message:
IGYPS0186-W
**MIGR** UPSI switches cannot be referenced directly in the PROCEDURE DIVISION under the
"NOCMPR2" compiler option.
SPECIAL-NAMES.
UPSI-0 ON STATUS IS T0 OFF STATUS IS F0
UPSI-1 ON STATUS IS T1 OFF STATUS IS F1
⋮
UPSI-7 ON STATUS IS T7 OFF STATUS IS F7
IF T0 DISPLAY "UPSI-0".
IF T1 DISPLAY "UPSI-1".
⋮
IF T7 DISPLAY "UPSI-7".
134 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Variable-length group moves
The calculation of the length of a sending or receiving ODO object can vary depending on whether CMPR2
or NOCMPR2 is in effect.
CMPR2
All ODO objects in sending and receiving fields involved in a group move, such as a MOVE statement, must
be set before the statement is executed. The actual lengths of the sender and receiver are calculated just
before the execution of the data movement statement. For a list of affected statements, see the message
below.
NOCMPR2
In some cases, NOCMPR2 uses the maximum length of a variable-length group when it is a receiver,
whereas CMPR2 uses the actual length. This behavior occurs when the receiver is variable length,
contains its own ODO object, and is the last group in a structure. For example:
01 ODO-SENDER
02 SEND-OBJ PIC 99.
02 SEND-ITEM PIC X OCCURS 1 TO 20 DEPENDING ON SEND-OBJ.
01 ODO-RECEIVER.
02 RECV-OBJ PIC 99.
02 RECV-ITEM PIC X OCCURS 1 TO 20 DEPENDING ON RECV-OBJ.
⋮
MOVE 5 TO SEND-OBJ.
MOVE 10 TO RECV-OBJ.
MOVE ODO-SENDER TO ODO-RECEIVER.
⋮
CMPR2:
Occurrences 1-5 of ODO-SENDER moved to ODO-RECEIVER.
Occurrences 6-10 of ODO-RECEIVER become spaces.
Occurrences 11-20 of ODO-RECEIVER are unchanged.
NOCMPR2:
Occurrences 1-5 of ODO-SENDER moved to ODO-RECEIVER.
Occurrences 6-20 of ODO-RECEIVER become spaces.
The programs that will have negative effects if used under NOCMPR2 are those that reference
occurrences of the table that are beyond the value of the ODO object when a data movement statement
was executed.
In the example above, if occurrences 11-20 have data in them before the group move, that data will be
lost after the group move if run under NOCMPR2.
Message
Compiling the program with the CMPR2 and FLAGMIG compiler options generates the following message
for each data movement statement that will behave differently under NOCMPR2:
IGYPS2222-W
**MIGR** The maximum length of receiver "ODO-RECEIVER" will be used under the "NOCMPR2"
compiler option.
This difference in variable-length group moves affects any statement that moves data. The affected
statements are:
ACCEPT identifier (Format 1 or Format 2)
MOVE . . . TO identifier
READ . . . INTO identifier
RELEASE identifier FROM . . .
RETURN . . . INTO identifier
REWRITE identifier FROM . . .
STRING . . . INTO identifier
UNSTRING . . . INTO identifier DELIMITER IN identifier
WRITE identifier FROM . . .
• Argument lists on INVOKE statements and parameter lists for methods are restricted to data types
that map to Java types and that are passed BY VALUE.
• Specification of a class-name that qualifies SUPER in the INVOKE statement is not supported. For
example you cannot use:
136 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
However, the following syntax continues to be supported in Enterprise COBOL:
METACLASS clauses
• External class names that are defined in the REPOSITORY paragraph must be defined with Java
naming conventions for fully qualified class names, rather than the CORBA rules of formation for
class names.
• Method names that are specified as literals use Java naming conventions rather than CORBA
naming conventions.
INVOKE
Instead of somNew, object instances are created with the syntax:
METHODS
COBOL methods can override inherited methods and can be overloaded, according to Java rules.
However, the OVERRIDE clause is not required or supported on the METHOD-ID paragraph in these
cases.
OBJECTS
• Object instances are freed through Java automatic garbage collection, rather than somFree.
• Object instance data is initialized through VALUE clauses or user-written initialization methods,
rather than with somInit.
• OBJECT and END OBJECT syntax must be specified unless the class does not specify any object
instance data or object instance methods.
TRUNC In releases of COBOL for OS/390 & VM prior to 2.2, unsigned binary data
items with TRUNC(BIN) were correctly supported only when the binary
value contained at most 15 bits for halfwords, 31 bits for fullwords, or 63
bits for doublewords. In other words, the sign bit was not used as part
of the numeric value when the data item was unsigned. With Enterprise
COBOL and COBOL for OS/390 & VM 2.2, all 16 bits of a halfword, all 32
bits of a fullword, and all 64 bits of a doubleword can be used as part
of the numeric value of an unsigned COMP-5 data item or an unsigned
binary data item with TRUNC(BIN).
For example, in a program compiled with TRUNC(BIN), a data item
declared like this
140 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 25. Compiler options not available in Enterprise COBOL
Compiler option Comments
ANALYZE The ANALYZE option is not available with Enterprise COBOL. Use the CICS, SQL,
and ADATA options instead.
CMPR2 The CMPR2 option is not available. You must convert programs compiled with
CMPR2 to 85 COBOL Standard to compile them with Enterprise COBOL
EVENTS The EVENTS option is not available. To emulate the COBOL/370 EVENTS compiler
option:
1. Specify the ADATA compiler option.
2. Allocate SYSADATA and SYSEVENTS.
3. Use the ADEXIT suboption of the EXIT compiler option with the sample exit
program IGYADXIT.
FLAGMIG The FLAGMIG option is not available. FLAGMIG requires CMPR2, which is not
available with Enterprise COBOL. Use CCCA, this Migration Guide, or a compiler
released prior to Enterprise COBOL to compile programs using FLAGMIG.
IDLGEN The IDLGEN option is not available. IDLGEN requires SOM-based OO COBOL,
which is not available with Enterprise COBOL.
NUMPROC(MIG) Enterprise COBOL does not support the NUMPROC(MIG) option in versions
after COBOL 4. If NUMPROC(MIG) is specified, Enterprise COBOL 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
6, consider using the NUMCHECK compiler option to help you migrate to
NUMPROC(PFD):
1. Compile your programs with NUMCHECK(ZON,PAC) and NUMPROC(PFD).
2. Run a thorough regression test with a good breadth of input data.
If your applications get no NUMCHECK messages or NUMCHECK abends, you can
safely compile with NUMPROC(PFD) and NONUMCHECK for production. This will
not only solve the invalid data problem, but NUMPROC(PFD) is the most efficient
setting for the NUMPROC compiler option.
For details, see NUMCHECK in the Enterprise COBOL for z/OS Programming Guide.
TYPECHK The TYPECHK option is not available. TYPECHK requires SOM-based OO COBOL,
which is not available with Enterprise COBOL.
WORD(NOOO) If you have existing IBM COBOL programs that were compiled with the
WORD(NOOO) compiler option, they must be changed if they use any of the
following reserved words: CLASS-ID, END-INVOKE, INHERITS, INVOKE, LOCAL-
STORAGE, METACLASS, METHOD, METHOD-ID, OBJECT, OVERRIDE, RECURSIVE,
REPOSITORY, RETURNING, SELF, SUPER.
The IGYCNOOO reserved word table is not shipped with the Enterprise COBOL
compiler.
Tip: You can tell if your Enterprise COBOL 3.4 compiler has this PTF installed by looking at the page
header in the compiler listing. The modification level was changed by this PTF from 0 to 1. If the product
name in the header looks like this: "Enterprise COBOL for z/OS 3.4.1", your compiler has the PTF installed.
144 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
– Limit the range of the comparison with reference-modification. For example:
- in the alphanumeric case of search argument 01 ARG PIC X(6) and key of 05 MY-KEY PIC
X(4) use this:
- in the numeric case of search argument 01 ARG PIC 9(6) and array key of 05 MY-KEY PIC
9(4) use this:
The second and third actions above will prevent the warning message in the future.
• For SEARCH ALL statements in which the search argument is signed and the table key is unsigned,
ensure that the search argument is correctly initialized to a positive value before the SEARCH statement
is run. Depending on the specific application logic in the COBOL program, it might be possible to make
one of the following changes:
– Change the data description of the argument to be unsigned.
– Move the search argument to a temporary variable with no sign and use the temporary variable in the
SEARCH ALL statement.
Either action will prevent the warning message in the future.
User modifications to the XML document during execution of the XML PARSE
statement
In versions earlier than Enterprise COBOL 5, the COMPAT XML parser was actively in progress when the
XML processing procedure was executing. In COBOL 5, any encoding conflicts are resolved and after that,
the entire document is parsed, and the XML events are stored in a buffer. After the parse is terminated,
the XML events are then presented from this buffer to your program by the PERFORM statement that
executes the processing procedure. Thus, if the program modifies the XML document in the processing
procedure code, the parser does not detect these modifications. However, in the implementation in earlier
versions, those modifications such as correcting an end tag name to match the start tag name would be
seen and acted on by the parser.
****************************************************************
*** Function: ***
*** Demonstate a difference between XML PARSE COMPAT on ***
*** COBOL 3/4 and COBOL 5 (or XMLSS on any version). ***
*** ***
*** In COBOL 3/4, the logical branch out of the XML ***
*** processing procedure by CEEMRCE terminates the ***
*** XML PARSE. In COBOL 5, it does not, resulting in ***
*** runtime messages such as: ***
*** IGZ0227S There was an invalid attempt to end an ***
*** XML PARSE statement. ***
*** when the program terminates (or attempts another parse).***
146 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
****************************************************************
Identification division.
Program-id. XMLMIGR1.
Data division.
Working-storage section.
1 XML-document pic x(4) value '<x/>'.
1 zer0 comp pic 9 value 0.
Local-storage section.
1 routine procedure-pointer.
1 token pointer.
1 ceesrp-data.
2 resume-point comp pic s9(9).
2 state pic x value 'I'.
1 fdbk-code.
2 condition-token-value.
88 fdbk-code-zero value low-value.
3 pic xx.
3 msg-no comp pic s9(4).
3 pic x(4).
2 pic x(4).
Procedure division. Main section.
Perform register-user-handler
Call 'CEE3SRP' using resume-point fdbk-code
Service label.
Repeat.
If state = 'I'
XML parse XML-document processing procedure XML-proc
Display 'Back from XML parse...'
Go to Repeat
Else
If state = 'R'
Display 'Resumed after exception; in mainline code.'
End-if
Perform unregister-user-handler
Display 'Another XML parse (P), or exit (E)?'
Accept state
If state = 'P'
Move '<y/>' to XML-document
XML parse XML-document processing procedure XML-proc.
Goback.
Register-user-handler.
Set routine to entry 'USERHDLR'
Set token to address of ceesrp-data
Call 'CEEHDLR' using routine token fdbk-code
If fdbk-code-zero
Display 'Registered exception handler successfully.'
Else
Display 'Failed to register exception handler!' msg-no
Move 16 to return-code
Stop run.
Unregister-user-handler.
Set routine to entry 'USERHDLR'
Call 'CEEHDLU' using routine fdbk-code
If fdbk-code-zero
Display 'Unregistered exception handler successfully.'
Else
Display 'Failed to unregister exception handler!' msg-no
Move 16 to return-code
Stop run.
XML-proc section.
Display XML-event '{' XML-text '}'
If XML-event = 'START-OF-DOCUMENT'
Display 'XML parse in progress...'
Move 1 to xml-code
Go to xp-srp.
If XML-event = 'START-OF-ELEMENT' and XML-text = 'x'
Compute tally = 1 / zer0.
Go to xp-exit.
Xp-srp.
*** Uncomment the next two lines to move the resume point to ***
*** within the XML processing procedure, thus allowing the ***
*** XML PARSE statement to terminate normally and correctly. ***
* Call 'CEE3SRP' using resume-point fdbk-code
* Service label
If state = 'R'
Display 'Resumed after exception; still in XML-proc.'
Move 'X' to state.
Xp-exit.
Continue.
End program XMLMIGR1.
****************************************************************
148 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
To compile with Enterprise COBOL 5 or 6, change it to:
avg
Is the average size of the COBOL records; strictly
less than m.
m
Is greater than or equal to the maximum size COBOL
record + 4.
In step 2 for simulated variable-length RRDS, coding other language elements that implied a variable-
length record format did not give you COBOL simulated variable-length RRDS. For example, the following
elements alone did not cause the use of simulated variable-length RRDS access, and therefore did not
require the SIMVRD runtime option:
• Multiple FD records of different lengths
• OCCURS . . . DEPENDING ON in the record definitions
• RECORD CONTAINS integer-1 TO integer-2 CHARACTERS
Use the REUSE IDCAMS parameter for files that contain records and that you will open for output.
• Define the file with the ORGANIZATION IS RELATIVE clause.
• Use FD entries to describe the records with variable-length sizes.
• Use the NOSIMVRD runtime option.
• Define the VSAM file through access-method services as an RRDS.
Errors: When you work with simulated variable-length relative data sets and true VSAM RRDS data sets,
an OPEN file status 39 occurs if the COBOL file definition and the VSAM data-set attributes do not match.
For more reference information about the commands for using variable-length RRDS, see z/OS DFSMS:
Access Method Services for Catalogs.
150 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Chapter 13. Compiling Enterprise COBOL 3 programs
There have been a number of changes to compiler options and debug behavior since Enterprise COBOL 3.
After reading these topics, see also Chapter 17, “Changes with Enterprise COBOL 5 and 6,” on page 181.
Also note, the SSRANGE compiled-in range checks cannot be disabled at run time using the runtime
option CHECK(OFF) or NOSSRANGE
For descriptions of new and modified options for Enterprise COBOL 5 and 6, see “Compiler option
changes in Enterprise COBOL 5 and 6” on page 186.
For a detailed list of options supported for the various compiler versions, see Appendix E, “Option
comparison,” on page 295.
152 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 29. The removed TEST suboptions (continued)
Removed Behavior if specified with compiler Diagnostic message level or
suboption category
SEPARATE In Enterprise COBOL 5 and 6.1: Diagnostic In Enterprise COBOL 5 and
message is issued. Debug information is always 6.1: Informational message
generated in the object program. about NOSEPARATE behavior
always in effect (Suboption
In Enterprise COBOL 6.2: TEST(SEPARATE)
tolerated, TEST in
causes the generated DWARF debugging
effect)
information to be written to the SYSDEBUG data
set instead of to the object program. In Enterprise COBOL 6.2: No
diagnostic messages will be
issued.
Note: None of the old TEST suboptions are recognized when specified in IGYCDOPT for setting installation
default options.
For details about choosing the appropriate TEST suboptions to meet your debugging needs, see “Debug
information changes with Enterprise COBOL 5 and 6” on page 153.
154 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Chapter 14. Upgrading from Enterprise COBOL 4
To compile with Enterprise COBOL 5 or 6, Enterprise COBOL 4 programs that use any of several features
might need to be upgraded.
Programs that contain any of the following language features might need to be modified:
• Programs using DATE FORMAT and windowed date functions. For details, see “Changes in millennium
language extensions in IBM Enterprise COBOL for z/OS 5 and 6” on page 159.
• Label declaratives. To compile programs with Enterprise COBOL 5 or 6, you must remove any format
2 declarative syntax: USE...AFTER...LABEL PROCEDURE..., and the syntax: GO TO MORE-LABELS. The
support for these was removed in Enterprise COBOL 5.
• Programs that use new reserved words as user words. For details, see “New reserved words” on page
91.
There is a new compiler option, FLAGMIG4, available with PTF for APAR PM93450 for Enterprise COBOL
4.2 to help you migrate to Enterprise COBOL 5 or 6. It is also recommended that you install PTFs
for APARs PI12240, PI26838, and PI58762 as these contain updates to the FLAGMIG4 option. The
FLAGMIG4 option identifies language elements in Enterprise COBOL 4 programs that are not supported,
or that are supported differently in Enterprise COBOL 5 or 6. The compiler will generate a warning
diagnostic message for all such language elements.
Note: The source code changes for COBOL 5 and 6 are rarely used COBOL language features and do not
affect 99% of COBOL users.
Tip: It is recommended that you review and apply the Enterprise COBOL 4 PTFs to support the
migration to Enterprise COBOL 5 or 6. For details, see http://www.ibm.com/support/docview.wss?
uid=swg21982146.
User modifications to the XML document during execution of the XML PARSE
statement
In versions earlier than Enterprise COBOL 5, the COMPAT XML parser was actively in progress when the
XML processing procedure was executing. In COBOL 5, any encoding conflicts are resolved and after that,
the entire document is parsed, and the XML events are stored in a buffer. After the parse is terminated,
the XML events are then presented from this buffer to your program by the PERFORM statement that
executes the processing procedure. Thus, if the program modifies the XML document in the processing
procedure code, the parser does not detect these modifications. However, in the implementation in earlier
versions, those modifications such as correcting an end tag name to match the start tag name would be
seen and acted on by the parser.
****************************************************************
*** Function: ***
*** Demonstate a difference between XML PARSE COMPAT on ***
*** COBOL 3/4 and COBOL 5 (or XMLSS on any version). ***
*** ***
*** In COBOL 3/4, the logical branch out of the XML ***
*** processing procedure by CEEMRCE terminates the ***
*** XML PARSE. In COBOL 5, it does not, resulting in ***
*** runtime messages such as: ***
*** IGZ0227S There was an invalid attempt to end an ***
*** XML PARSE statement. ***
*** when the program terminates (or attempts another parse).***
****************************************************************
Identification division.
Program-id. XMLMIGR1.
Data division.
Working-storage section.
1 XML-document pic x(4) value '<x/>'.
156 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
1 zer0 comp pic 9 value 0.
Local-storage section.
1 routine procedure-pointer.
1 token pointer.
1 ceesrp-data.
2 resume-point comp pic s9(9).
2 state pic x value 'I'.
1 fdbk-code.
2 condition-token-value.
88 fdbk-code-zero value low-value.
3 pic xx.
3 msg-no comp pic s9(4).
3 pic x(4).
2 pic x(4).
Procedure division. Main section.
Perform register-user-handler
Call 'CEE3SRP' using resume-point fdbk-code
Service label.
Repeat.
If state = 'I'
XML parse XML-document processing procedure XML-proc
Display 'Back from XML parse...'
Go to Repeat
Else
If state = 'R'
Display 'Resumed after exception; in mainline code.'
End-if
Perform unregister-user-handler
Display 'Another XML parse (P), or exit (E)?'
Accept state
If state = 'P'
Move '<y/>' to XML-document
XML parse XML-document processing procedure XML-proc.
Goback.
Register-user-handler.
Set routine to entry 'USERHDLR'
Set token to address of ceesrp-data
Call 'CEEHDLR' using routine token fdbk-code
If fdbk-code-zero
Display 'Registered exception handler successfully.'
Else
Display 'Failed to register exception handler!' msg-no
Move 16 to return-code
Stop run.
Unregister-user-handler.
Set routine to entry 'USERHDLR'
Call 'CEEHDLU' using routine fdbk-code
If fdbk-code-zero
Display 'Unregistered exception handler successfully.'
Else
Display 'Failed to unregister exception handler!' msg-no
Move 16 to return-code
Stop run.
XML-proc section.
Display XML-event '{' XML-text '}'
If XML-event = 'START-OF-DOCUMENT'
Display 'XML parse in progress...'
Move 1 to xml-code
Go to xp-srp.
If XML-event = 'START-OF-ELEMENT' and XML-text = 'x'
Compute tally = 1 / zer0.
Go to xp-exit.
Xp-srp.
*** Uncomment the next two lines to move the resume point to ***
*** within the XML processing procedure, thus allowing the ***
*** XML PARSE statement to terminate normally and correctly. ***
* Call 'CEE3SRP' using resume-point fdbk-code
* Service label
If state = 'R'
Display 'Resumed after exception; still in XML-proc.'
Move 'X' to state.
Xp-exit.
Continue.
End program XMLMIGR1.
****************************************************************
*** LE user condition handler, invoked when the fixed-point ***
*** divide exception occurs (system completion code S0C9). ***
****************************************************************
Identification division.
Program-id. USERHDLR.
Data division.
Upgrading Enterprise COBOL 4.1 programs that have XML PARSE statements
and that use the XMLPARSE(XMLSS) compiler option
There are differences in XML PARSE behavior with the XMLPARSE(XMLSS) compiler option in effect
between Enterprise COBOL 4.1 and Enterprise COBOL 4.2 or later. In Enterprise COBOL 4.1 when you
parsed an XML document using the XMLPARSE(XMLSS) compiler option and it contained character
references that could not be expressed in the encoding of the document, the result was a single
ATTRIBUTE-CHARACTERS or CONTENT-CHARACTERS XML event in which every unrepresentable
character reference was replaced by a hyphen-minus. No indication was given to the program that the
substitution occurred.
For example, parsing the content of the following XML element:
<elem>abcሴxyz</elem>
under Enterprise COBOL 4.1 with encoding CCSID 1140 and with the XMLPARSE(XMLSS) compiler
option in effect, resulted in a single CONTENT-CHARACTERS XML event with special register XML-TEXT
containing the (EBCDIC) string:
abc-xyz
<elem>abcሴxyz</elem>
under Enterprise COBOL 4.2 and later results in the following sequence of XML events:
• CONTENT-CHARACTERS with XML-TEXT containing abc
• CONTENT-NATIONAL-CHARACTER with XML-NTEXT containing NX'1234'
• CONTENT-CHARACTERS with XML-TEXT containing xyz
158 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Converting programs that use new reserved words
Some reserved words have been added since Enterprise COBOL 4.
If your programs use any of the new reserved words as user-defined words (such as data item names or
paragraph names), then those words must be changed. You can do something similar to what CCCA does
and just add a suffix such as -85 to all instances of the word. For example:
Also note, the compiled-in range checks (for programs compiled with the SSRANGE compiler option)
cannot be disabled at run time using the runtime options CHECK(OFF) or NOSSRANGE.
For descriptions of new and modified options for Enterprise COBOL 5 and 6, see “Compiler option
changes in Enterprise COBOL 5 and 6” on page 186.
For a detailed list of options supported for the various compiler versions, see Appendix E, “Option
comparison,” on page 295.
For detailed descriptions of all options, see the Enterprise COBOL Programming Guide.
162 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
locate the starting address of the WORKING-STORAGE SECTION might be affected. For details, see
“WORKING-STORAGE SECTION changes” on page 176.
• Enterprise COBOL 6 uses interprocess communication (IPC) message queues within the compiler.
Therefore, if you compile in z/OS UNIX with cob2 and the compiler experiences an internal error and
gets terminated with a KILL signal, you will need to query any message queues that are left over when
the compiler is killed and remove the stale message queues. You can remove the stale message queues
with the following z/OS UNIX commands:
1. Enter ipcs -q to list queues.
2. Find queues associated with your user ID.
3. Enter ipcrm -q to delete queues.
If you compile in z/OS batch, you do not have to remove stale message queues after a compiler error.
• PPA1 changes in Enterprise COBOL 6.3
Starting in Enterprise COBOL 6.3, bit 30 of flag3 (offset X'1C') of PPA1 may be set to indicate that the
Extended Flag field is present. If this bit is set, the extended flag will have bit 0 set to indicate
that Vector Registers Area is in the optional area. This should not affect tools or program code
that are accessing PPA1 according to the Language Environment interface. Refer to the z/OS Language
Environment Vendor Interfaces for details about PPA1.
When debugging your COBOL programs, you will find that there have been a large number of
improvements and behavior changes introduced with Enterprise COBOL 5 and 6. For details about
changes in debugging with IBM z/OS Debugger, see “z/OS Debugger changes with Enterprise COBOL
5 and 6” on page 221.
Reserved words
Starting in Enterprise COBOL 6.1, ALLOCATE, DEFAULT, END-JSON, FREE, JSON, and JSON-CODE are new
reserved words. Existing programs that use these words as user-defined words (for example, as data
names or paragraph names) will get S-level diagnostic messages with Enterprise COBOL 6. You must
change instances of these reserved words to other words such as ALLOCATE-X or JSON-Y, or you can use
the CCCA utility to do it for you.
Starting in Enterprise COBOL 6.2, JSON-STATUS is a new reserved word. Existing programs that use
JSON-STATUS as a user-defined word (for example, as a data name or paragraph name) will get S-level
diagnostic messages with Enterprise COBOL 6.2. You must change these instances of JSON-STATUS to
other words such as JSON-STATUS-X, or you can use the CCCA utility to do it for you.
Starting in Enterprise COBOL 6.3, BYTE-LENGTH, JAVA, LIMIT, POINTER-32, and UTF-8 are new reserved
words. Existing programs that use these words as user-defined words (for example, as data names or
paragraph names) will get S-level diagnostic messages with Enterprise COBOL 6.3. You must change
instances of these reserved words to other words such as BYTE-LENGTH-X or BYTE-LENGTH-Y, or you
can use the CCCA utility to do it for you.
Starting in Enterprise COBOL 6.4, FUNCTION-ID is a new reserved word. Existing programs that use
FUNCTION-ID as a user-defined word (for example, as a data name or paragraph name) will get S-level
diagnostic messages with Enterprise COBOL 6.4. You must change these instances of FUNCTION-ID to
other words such as FUNCTION-ID-X, or you can use the CCCA utility to do it for you.
VALUE clause
In Enterprise COBOL 5 and earlier versions, a non-88 level VALUE clause in the LINKAGE SECTION or the
FILE SECTION was treated as a comment and ignored.
For example, with Enterprise COBOL 5 and earlier versions:
However, starting in Enterprise COBOL 6.1, the VALUE clause for the LINKAGE SECTION and the FILE
SECTION items is now syntax checked and has meaning.
With Enterprise COBOL 6:
168 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
==000225==> IGYGR1080-S A "VALUE" clause literal was not compatible with the data
category of the subject data item. The "VALUE" clause was discarded.
In COBOL 6:
• If the data VALUE literal is incompatible with the PICTURE clause, as shown in the example above, the
IGYGR1080-S error message will be issued.
• If the data VALUE literal is compatible with the PICTURE clause, it will be used to initialize the data item
in the LINKAGE SECTION when the data item is used in an INITIALIZE...TO VALUE statement.
In summary, a COBOL 5 program with a non-88 level VALUE clause in the LINKAGE SECTION that is
compiled with an RC=0 could get an RC=12 with COBOL 6 or have the LINKAGE data item be initialized
when the data item is used in an INITIALIZE...TO VALUE statement, depending on the validity of the
VALUE clause literal.
JAVAIOP New option from Enterprise COBOL 6.4. It controls the behavior of COBOL
programs that interoperate with Java though the JAVA-CALLABLE or JAVA-
SHAREABLE directives or by calling Java static methods using the CALL
statement.
LP New option from Enterprise COBOL 6.3. It can be used to indicate whether an
AMODE 31 (31-bit) or AMODE 64 (64-bit) program should be generated with the
related language features enabled.
NUMCHECK New option in Enterprise COBOL 6.1 with the service PTFs and from 6.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.
PARMCHECK New option in Enterprise COBOL 6.1 with the service PTFs and from 6.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.
SMARTBIN New option from Enterprise COBOL 6.4. It instructs 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.
For details, see “SMARTBIN changes” on page 174.
SUPPRESS New option from Enterprise COBOL 6.1. It controls whether to ignore the
SUPPRESS phrase of COPY statements.
170 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 32. Compiler options new with Enterprise COBOL 6 (continued)
Compiler option Comments
TUNE New option from Enterprise COBOL 6.3 with the service PTFs. It specifies the
architecture for which the executable program will be optimized.
In Enterprise COBOL 6.4, TUNE(8) and TUNE(9) are removed, and a new higher
level of TUNE(14) is accepted.
The default TUNE level matches the ARCH level if ARCH is specified. If ARCH is
not specified, both ARCH and TUNE default to 10.
VSAMOPENFS New option from Enterprise COBOL 6.1. It affects the user file status reported
from successful VSAM OPEN statements that require verified file integrity check.
ARCH It specifies the machine architecture for which the executable program
instructions are to be generated.
• In Enterprise COBOL 6.1, ARCH(7) is the default.
• In Enterprise COBOL 6.2, a new higher level of ARCH(12) is accepted, and
ARCH(7) is still the default.
• In Enterprise COBOL 6.3, ARCH(7) is removed, and a new higher level of
ARCH(13) is accepted. ARCH(8) is the default.
• In Enterprise COBOL 6.4, ARCH(8) and ARCH(9) are removed, and a new higher
level of ARCH(14) is accepted. ARCH(10) is the default.
INITCHECK In Enterprise COBOL 6.1 with the service PTFs, 6.2 with the service PTFs, and
from 6.3 with the service PTFs, new suboptions LAX | STRICT are added to the
INITCHECK option to control whether the compiler will issue warning messages
for data items unless they are initialized on at least one, or on all, logical paths to
a statement.
LANGUAGE
To change to uppercase English or Japanese compiler messages in COBOL 6, 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)
/*
NOSTGOPT In Enterprise COBOL 6.1, data items can get optimized with OPT(2) even when
NOSTGOPT was in effect. In Enterprise COBOL 6.1 with the service PTFs and
from 6.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.
NUMCHECK From Enterprise COBOL 6.3, when invalid data is found at compile time,
regardless of whether NUMCHECK(MSG) or NUMCHECK(ABD) is in effect, an error-
level message is produced and the check is removed.
RULES In Enterprise COBOL 6.2 with the service PTFs and from 6.3, 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).
• LAXREDEF | NOLAXREDEF tells the compiler whether to issue warning
messages when a data item is redefined to a smaller item on any level.
From Enterprise COBOL 6.4, if there are multiple RULES specifications for a
compilation, the suboptions are additive, which means they are accumulated.
SOURCE From Enterprise COBOL 6.3 with the service PTFs, new suboptions DEC | HEX
are added to SOURCE compiler option. If SOURCE(DEC) is in effect, the line
numbers for the listing of the source will be in decimal format. If SOURCE(HEX)
is in effect, the line numbers for the listing of the source will be in hexadecimal
format.
SSRANGE In Enterprise COBOL 6.1 with the service PTFs and from 6.2, new suboptions MSG
| ABD are added to the SSRANGE compiler option to control the runtime behavior
of the COBOL program when a range check fails.
TEST From Enterprise COBOL 6.2, new suboptions SEPARATE | 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).
172 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 34. Compiler option not available in Enterprise COBOL 6 (continued)
Compiler option Comments
ZONECHECK In Enterprise COBOL 6.1 with the service PTFs and from 6.2, ZONECHECK
is deprecated but is tolerated for compatibility, and it is replaced by
NUMCHECK(ZON).
For a detailed list of options supported for the various compiler versions, see Appendix E, “Option
comparison,” on page 295.
For a detailed list of compiler options that can affect performance, see How to tune compiler options to get
the most out of COBOL 6 in the Enterprise COBOL Performance Tuning Guide.
For detailed descriptions of all the compiler options, see Compiler options in the Enterprise COBOL
Programming Guide.
Listing changes
• Starting in Enterprise COBOL 6.1, the build level information (of the form PYYMMDD) is always included
in the header of the listing file, which assists with determining the maintenance level of the compiler.
Here is an example of the listing header:
In Enterprise COBOL 5 and 6.1, the diagnostic messages are in the middle of the listing. In Enterprise
COBOL 6.2 and later versions, the diagnostic messages are at the bottom of the listing as with
Enterprise COBOL 4 and earlier compilers.
• Starting in Enterprise COBOL 6.3, listing terminologies change as follows:
– STATIC MAP in Enterprise COBOL 6.2 and earlier versions is changed to INITIAL HEAP STORAGE
MAP.
– Writeable static area (WSA) in Enterprise COBOL 6.2 and earlier versions is changed to storage.
– WSA24 in Enterprise COBOL 6.2 and earlier versions is changed to BELOW THE LINE STORAGE.
– AUTOMATIC MAP in Enterprise COBOL 6.2 and earlier versions is changed to STACK STORAGE MAP.
JCL changes
To change to uppercase English or Japanese compiler messages in COBOL 6, 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:
Starting in Enterprise COBOL 6.3, new cataloged procedures for doing compilation have been provided to
help developing COBOL AMODE 64 (64-bit) programs. The AMODE 64 support is a new feature introduced
to Enterprise COBOL 6.3. See Developing AMODE 64 programs (Enterprise COBOL for z/OS Programming
Guide) for details about AMODE 64 support.
SMARTBIN changes
Starting in Enterprise COBOL 6.4, the SMARTBIN option is on by default when LP(32) is in effect.
SMARTBIN instructs the compiler to generate modules containing additional binary metadata that enables
them to be optimized by IBM Automatic Binary Optimizer (ABO) for z/OS (ABO) 2.2. When SMARTBIN is
in effect, the additional binary metadata is placed in a NOLOAD segment of the module. To generate the
metadata, compile times may increase by up to 21% at OPT(0) and 2-3% at OPT(1) and OPT(2) on an
IBM z15™ machine with hardware compression turned on, and up to 33% at OPT(0) and 10% at OPT(1)
and OPT(2) with hardware compression turned off. The additional metadata will also increase the size
of the module on disk, requiring larger load libraries, but will not increase the size in memory when the
program is running since it is not loaded. The size increase on disk will be approximately 2 times to 3
times the size of the original binary.
You can change the option to NOSMARTBIN, however, without the additional binary metadata, COBOL
modules built with Enterprise COBOL 6.4 will be ineligible for ABO optimization and you would need to
recompile and test your modules in the future to maximize benefit from IBM Z hardware improvements. If
you use ABO or plan to in the future, the SMARTBIN option is recommended.
Refer to the IBM Automatic Binary Optimizer for z/OS product page for additional information on ABO
benefits.
Related references
SMARTBIN
(Enterprise COBOL for z/OS Programming Guide)
174 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
– 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 6 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 6, 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 in Enterprise COBOL 6 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 6.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.
A: For AMODE 31
The following description applies when the program is compiled with LP(32):
How to find the PPA4 (Program Prolog Area 4) in a dump?
1. Find the start of the program in the dump from the traceback.
2. At the starting address + x'0C' is an offset value. This is the offset to the PPA1 from the start of the
program.
3. Starting address + PPA1 offset = PPA1.
4. Go there in the dump.
5. At PPA1 + x'04' is an offset value. This is the offset to the PPA2 from the start of the program.
6. Starting address + PPA2 offset = PPA2.
7. Go there in the dump.
8. At PPA2 + x'08' is an offset value. This is the offset to the PPA4 from the PPA2 address.
9. PPA2 + PPA4 offset = PPA4.
10. Go there in the dump. You are now at the PPA4.
Next, you need to know the layout of the PPA4.
PPA4 layout
For information about the layout of PPA4 and each PPA4 offset, length, and description, see COBOL V5+
32-bit PPA4 layout in the z/OS Language Environment Vendor Interfaces.
Next, you need to know some terminology.
Terms to know
NORENT static area
This storage area is allocated in the executable for each program that was compiled with NORENT. A
NORENT program’s WORKING-STORAGE will be located here.
LE’s writable static area (WSA)
Every COBOL 5 or 6 program object (executable) has this storage area.
RENT static area
This storage area is allocated inside the WSA for every program that is statically bound into the
executable and compiled with RENT. Each program has their own RENT static area. A program’s
WORKING-STORAGE may or may not be located here.
Program static area
This storage area is allocated outside of the WSA only if certain conditions are met. In those cases, the
program’s WORKING-STORAGE will be located here, instead of in the RENT static area.
Next, you need to understand that there are three locations where WORKING-STORAGE can reside.
176 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Explanation of the areas where WORKING-STORAGE can reside
Once you understand the three areas where WORKING-STORAGE could reside, you need to know how
to determine where a program’s WORKING-STORAGE actually does reside. For details, see WORKING-
STORAGE location and Layout of the Language Environment WSA, STATIC, PROGRAM STATIC, and User
Working Storage in IGZXAPI in the z/OS Language Environment Vendor Interfaces.
Notes:
1. In COBOL 5, there is a WSOPT compiler option. In COBOL 6, there is no longer a WSOPT compiler
option, but rather a signature information bit for WSOPT that is automatically set by the compiler.
2. For SPANNED RECORDS, the WSOPT signature information bit is OFF. For NO SPANNED RECORDS,
the WSOPT signature information bit is ON.
• You can scan your programs for 'RECORDING MODE' and look for any files set to 'S' to determine if
SPANNED RECORDS are used.
• Another alternative is to check the signature information bytes in the listing for the WSOPT bit,
which is signature byte 8, bit 3. For example, take the following from a listing:
Byte 8 is x'10', which is b'00010000'. Numbering the bits from left to right as 01234567, because
bit 3 is on, WSOPT is on.
Once you know what area the WORKING-STORAGE resides in, then you will know how to find it.
178 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 36. How to find the PPA4, NORENT static area, LE’s WSA, RENT static area, and program static area
in a dump? (continued)
What to find? How to find it in a dump?
RENT static area The address is located in storage at
<The address in storage at CEECAA (or R12) +
x'1F4'> +
<the offset in the program’s PPA4 + x'0C'>
Program static area The address is located in storage at
<The address in storage at CEECAA (or R12) +
x'1F4’> +
<the offset in the program’s PPA4 + x'0C'> +
<the offset in the program’s PPA4 + x'10'>
Once you find these areas in a dump, then you can compare that to the compile listing.
In a COBOL listing:
• The INITIAL HEAP STORAGE MAP shows the layout of the RENT static area or the NORENT static area.
• The WORKING-STORAGE MAP or the BELOW THE LINE STORAGE MAP shows the layout of the program
static area.
B: For AMODE 64
The following information applies when the program is compiled with LP(64):
Information about the WORKING-STORAGE SECTION can be found in the PPA4 of the program together
with the Heap Storage Address Table. Follow the steps below to locate them.
1. Find the entry point address of the program in the dump from the traceback. In the LE CEEDUMP
traceback, this is the address under the "E Addr" column corresponding to the row of the program.
In the example below, HELLO is the COBOL program. Its entry point address is X'260000A8'. This
address should contain the first executable instruction of the program, that is, an STMG instruction.
Traceback:
DSA Entry E Offset …
1 CEEHDSP +00003F3C
2 CELQHROD +00000266
3 HELLO +00000224
4 CELQINIT +00001D0C
2. At program entry point offset -x'08', that is, before the entry point, there is an integer value. This value
is the offset from the entry point address to PPA1.
3. At PPA1+x'04', there is an offset value. This is the offset from the entry point address to PPA2.
4. At PPA2+x'08', there is an offset value. This is the offset from PPA2 to PPA4.
5. At PPA4+x'7C', there is an offset value. This is the offset from the environment of the program to the
Heap Storage Address Table.
Environment here refers to the XPLINK environment of the program. This is the address in register R5 on
entry into the program. The first instruction of the program, the STMG, stores the register to the stack. The
contents of R5 can be found in the dump.
Heap Storage Address Table
Offset of this table from the environment of the program is in PPA4+X'7C'.
For information about the layout of PPA4 and each PPA4 offset, length, and description, see COBOL 64-bit
PPA4 layout in the z/OS Language Environment Vendor Interfaces.
Related tasks
Reading LIST output (Enterprise COBOL for z/OS Programming Guide)
Related references
Example: Program prolog areas (Enterprise COBOL for z/OS Programming Guide)
Common interfaces and conventions (z/OS Language Environment Vendor Interfaces)
180 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Chapter 17. Changes with Enterprise COBOL 5 and 6
There are a few differences from all previous compilers to consider when using Enterprise COBOL 5 or 6.
After reading the section about migrating a program or application from the compiler you are currently
using, read this section.
The changes with Enterprise COBOL 5 and 6 mainly fall into the following categories:
• Prerequisite software and service changes
• COBOL source code differences
• Compiler option changes
• Compiling behavior differences
• Binding (link-editing) changes
• Changes at run time
• Debug information and Debug Tool behavior changes
Migrating to COBOL 5 or 6 is different from earlier COBOL migrations in that we recommend regression
testing to see if your programs use invalid data and get different results with COBOL 5 or 6. Previous
COBOL compilers generated the same code and the same data layout, so invalid data would get the same
results from version to version.
With current service applied, Enterprise COBOL 5.1 is equivalent to Enterprise COBOL 5.2 for migration
purposes.
The performance characteristics of COBOL 5 of the compiler are similar to those of COBOL 6. Except
where otherwise noted, the changes and migration recommendations in this section are applicable to
both 5 and 6.
You no longer need to find lists of APARs and PTFs in PSP buckets. As of Enterprise COBOL for z/OS 5, you
must use SMP/E FIXCATs to identify the required PTFs on other products to work with Enterprise COBOL 5
and 6. The required service PTFs for COBOL for z/OS 5 and 6 are not documented in this Migration Guide,
are not included in PSP buckets, and are not included in any handouts for conferences.
SMP/E FIXCATs allow you to have the most up to date and correct information about Enterprise COBOL 5
and 6 required service. It is the easiest way to quickly determine if you have all the necessary required
service PTFs installed. For Enterprise COBOL 5 and 6, you should use SMP/E 3.5 or later support for
FIXCAT HOLDDATA to do programmatic target system PTF verification. These PTFs are identified with a
FIXCAT category name in HOLDDATA. There are now 6 for COBOL.
• For COBOL 5.1: IBM.TargetSystem-RequiredService.Enterprise-COBOL.V5R1
• For COBOL 5.2: IBM.TargetSystem-RequiredService.Enterprise-COBOL.V5R2
• For COBOL 6.1: IBM.TargetSystem-RequiredService.Enterprise-COBOL.V6R1
• For COBOL 6.2: IBM.TargetSystem-RequiredService.Enterprise-COBOL.V6R2
• For COBOL 6.3: IBM.TargetSystem-RequiredService.Enterprise-COBOL.V6R3
• For COBOL 6.4: IBM.TargetSystem-RequiredService.Enterprise-COBOL.V6R4
A HOLDDATA type FIXCAT (fix category) is used to associate an APAR to a particular category of fix for
necessary target system PTFs. To help identify PTFs required but not yet installed for your upgrade to
182 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Enterprise COBOL 5 or 6 on your current system, use the SMP/E REPORT MISSINGFIX command. Here is
a sample command used to run against your z/OS CSI for COBOL 6.4 (and earlier versions):
SET BDY(GLOBAL).
REPORT MISSINGFIX ZONES(ZOS13T)
FIXCAT(IBM.TargetSystem-RequiredService.Enterprise-COBOL.V5R1,
IBM.TargetSystem-RequiredService.Enterprise-COBOL.V5R2,
IBM.TargetSystem-RequiredService.Enterprise-COBOL.V6R1,
IBM.TargetSystem-RequiredService.Enterprise-COBOL.V6R2,
IBM.TargetSystem-RequiredService.Enterprise-COBOL.V6R3
IBM.TargetSystem-RequiredService.Enterprise-COBOL.V6R4)
For complete information about the REPORT MISSINGFIX command, see SMP/E Commands.
LABEL declarative
There have been changes to LABEL declarative support. If your programs have any of these language
elements, they must be removed before you can compile and run these programs with Enterprise COBOL
5 or 6:
• Format 2 declarative syntax: USE...AFTER...LABEL PROCEDURE... is no longer supported
• The syntax: GO TO MORE-LABELS is no longer supported.
INSPECT...TALLYING behavior
For INSPECT...TALLYING, previous versions of the compiler insert zone nibbles in a signed numeric
display inspected item before performing the INSPECT. This will, for example, change SPACES to ZEROS.
COBOL 5 and later versions no longer do this zone normalization. Having INSPECT without a REPLACING
clause update the inspected item was unexpected, and COBOL 5 and later versions do not do this.
There is no way to have COBOL 5 and later versions behave in the same unexpected way as COBOL 4.
Adding or removing REPLACING will not replicate COBOL 4 and earlier behavior, which we consider to
be in error. To avoid the unexpected behavior in COBOL 4, you can add a NUMERIC class test before the
INSPECT, avoid moving spaces or alphanumeric data into the inspected item, or move zeroes into the
inspected item. COBOL 5 and later versions will not unexpectedly modify the inspected data item.
For example:
01 TEST-DATA.
02 NUM-DISP PIC S9(9).
. . .
MOVE 0 To TALLY
MOVE SPACES TO TEST-DATA
INSPECT NUM-DISP TALLYING TALLY FOR ALL ZEROES
IF TALLY > 0 THEN
DISPLAY 'This is COBOL V4 or earlier'
ELSE
DISPLAY 'This is COBOL V6'
If your programs rely on this behavior, then you can change your program to do INSPECT, with
REPLACING to, for example, replace SPACES with ZEROS in COBOL 6 programs:
This is effectively what COBOL 4 did, but you might have to replace other nonnumeric content of the
signed numeric display data item.
Move instruction
When moving a 16-bit COMP-5 sender (PICTURE clause PIC 9(2) through PIC 9(4)), with value x'8000' or
higher, to an alphanumeric data item, Enterprise COBOL 4.2 incorrectly uses an instruction that loads the
value as a 32-bit value with the high sixteen bits all ones. This incorrectly changes the value that is moved
to the PIC X(9) receiver. Enterprise COBOL 5 and 6 correctly load the 16-bit value as a 32-bit value with
the high sixteen bits all zeros, which is correct, but is different from Enterprise COBOL 4.2.
Reserved words
Starting in Enterprise COBOL 6.1, ALLOCATE, DEFAULT, END-JSON, FREE, JSON, and JSON-CODE are new
reserved words. Existing programs that use these words as user-defined words (for example, as data
names or paragraph names) will get S-level diagnostic messages with Enterprise COBOL 6. You must
change instances of these reserved words to other words such as ALLOCATE-X or JSON-Y, or you can use
the CCCA utility to do it for you.
184 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Starting in Enterprise COBOL 6.2, JSON-STATUS is a new reserved word. Existing programs that use
JSON-STATUS as a user-defined word (for example, as a data name or paragraph name) will get S-level
diagnostic messages with Enterprise COBOL 6.2. You must change these instances of JSON-STATUS to
other words such as JSON-STATUS-X, or you can use the CCCA utility to do it for you.
Starting in Enterprise COBOL 6.3, BYTE-LENGTH, JAVA, LIMIT, POINTER-32, and UTF-8 are new reserved
words. Existing programs that use these words as user-defined words (for example, as data names or
paragraph names) will get S-level diagnostic messages with Enterprise COBOL 6.3. You must change
instances of these reserved words to other words such as BYTE-LENGTH-X or BYTE-LENGTH-Y, or you
can use the CCCA utility to do it for you.
Starting in Enterprise COBOL 6.4, FUNCTION-ID is a new reserved word. Existing programs that use
FUNCTION-ID as a user-defined word (for example, as a data name or paragraph name) will get S-level
diagnostic messages with Enterprise COBOL 6.4. You must change these instances of FUNCTION-ID to
other words such as FUNCTION-ID-X, or you can use the CCCA utility to do it for you.
VALUE clause
In Enterprise COBOL 5 and earlier versions, a non-88 level VALUE clause in the LINKAGE SECTION or the
FILE SECTION was treated as a comment and ignored.
For example, with Enterprise COBOL 5 and earlier versions:
However, starting in Enterprise COBOL 6.1, the VALUE clause for the LINKAGE SECTION and the FILE
SECTION items is now syntax checked and has meaning.
With Enterprise COBOL 6:
==000225==> IGYGR1080-S A "VALUE" clause literal was not compatible with the data
category of the subject data item. The "VALUE" clause was discarded.
In COBOL 6:
• If the data VALUE literal is incompatible with the PICTURE clause, as shown in the example above, the
IGYGR1080-S error message will be issued.
• If the data VALUE literal is compatible with the PICTURE clause, it will be used to initialize the data item
in the LINKAGE SECTION when the data item is used in an INITIALIZE...TO VALUE statement.
In summary, a COBOL 5 program with a non-88 level VALUE clause in the LINKAGE SECTION that is
compiled with an RC=0 could get an RC=12 with COBOL 6 or have the LINKAGE data item be initialized
when the data item is used in an INITIALIZE...TO VALUE statement, depending on the validity of the
VALUE clause literal.
ARCH New option. It specifies the machine architecture for which the executable
program instructions are to be generated.
• In Enterprise COBOL 5.1, ARCH(6) is the default.
• In Enterprise COBOL 5.2 and 6.1, ARCH(6) is no longer accepted, and ARCH(7)
is the default.
• In Enterprise COBOL 6.2, a new higher level of ARCH(12) is accepted. ARCH(7)
is still the default.
• In Enterprise COBOL 6.3, ARCH(7) is removed, and a new higher level of
ARCH(13) is accepted. ARCH(8) is the default.
• In Enterprise COBOL 6.4, ARCH(8) and ARCH(9) are removed, and a new higher
level of ARCH(14) is accepted. ARCH(10) is the default.
COPYLOC New option in Enterprise COBOL 6.1 with the service PTFs, 6.2 with the service
PTFs, and from 6.3. 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.
COPYRIGHT New option from Enterprise COBOL 5.2. It places a string in the object module if
the object module is generated.
DEFINE New option from Enterprise COBOL 6.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.
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 IBM
z/Architecture processors. HGPR(PRESERVE) is the default.
INITCHECK New option in Enterprise COBOL 5.2 with the service PTFs, 6.1 with the service
PTFs, and from 6.2. It controls whether to check for uninitialized data items and
issue warning messages when they are used without being initialized.
INITIAL New option in Enterprise COBOL 6.2 with the service PTFs and from 6.3. 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.
INLINE New option in Enterprise COBOL 6.1 with the service PTFs and from 6.2 and later
versions and later versions. It controls the compiler to consider whether to inline
procedures referenced by PERFORM statements in the source program. INLINE is
a potential performance boosting option. Note that INLINE was always in effect in
COBOL 5.
186 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 39. Compiler options new with Enterprise COBOL 5 and 6 (continued)
Compiler option Comments
INVDATA New option in Enterprise COBOL 6.2 with the service PTFs and from 6.3.
The option supercedes the deprecated ZONEDATA option. It tells the compiler
whether data in USAGE DISPLAY and PACKED-DECIMAL data items is valid, and if
not, what the behavior of the compiler should be.
To ease your migration to COBOL 5 or 6:
• If your digits, sign code, and zone bits are valid, use NOINVDATA and the same
NUMPROC setting that you used with COBOL 4 when using COBOL 5 or 6.
Note: If you used NUMPROC(MIG) in 4, it is no longer available in COBOL 5 or 6
and you should use NUMPROC(NOPFD) in this scenario instead.
• If you have invalid digits, invalid sign code, or invalid zone bits:
– If you used NUMPROC(MIG) with COBOL 4, use
INVDATA(FORCENUMCMP,NOCLEANSIGN) and NUMPROC(NOPFD) with
COBOL 5 or 6.
– If you used NUMPROC(NOPFD) with COBOL 4, use
INVDATA(NOFORCENUMCMP,CLEANSIGN) (or simply INVDATA) with COBOL
5 or 6.
– If you used NUMPROC(PFD) with COBOL 4, use
INVDATA(NOFORCENUMCMP,CLEANSIGN) (or simply INVDATA) with COBOL
5 or 6.
JAVAIOP New option from Enterprise COBOL 6.4. It controls the behavior of COBOL
programs that interoperate with Java though the JAVA-CALLABLE or JAVA-
SHAREABLE directives or by calling Java static methods using the CALL
statement.
LP New option from Enterprise COBOL 6.3. It indicates whether an AMODE 31 (31-
bit) or AMODE 64 (64-bit) program should be generated with the related language
features enabled. LP(32) is the default.
MAXPCF New option. It instructs the compiler not to optimize code if the program contains
a complexity factor greater than n.
• From Enterprise COBOL 5.1, MAXPCF(60000) is the default.
• From Enterprise COBOL 6.2, MAXPCF(100000) is the default.
NUMCHECK New option in Enterprise COBOL 5.2 with the service PTFs, 6.1 with the service
PTFs, and from 6.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.
PARMCHECK New option in Enterprise COBOL 6.1 with the service PTFs and from 6.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.
QUALIFY New option from Enterprise COBOL 5.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 from Enterprise COBOL 5.2. It requests information about your
program from the compiler to improve the program by flagging certain types of
source code at compile time.
SQLIMS New option in Enterprise COBOL 5.1 with the service PTFs, and from 5.2. 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.
STGOPT New option. It controls storage optimization. NOSTGOPT is the default.
In Enterprise COBOL 5.1, 5.2, and 6.1, data items can get optimized with OPT(2)
even when NOSTGOPT was in effect. NOSTGOPT was changed in Enterprise
COBOL 6.1 with the service PTFs and from 6.2, so that no optimization of storage
or data items occurs even with OPT(2). This is especially helpful for WORKING-
STORAGE eye-catchers.
SUPPRESS New option from Enterprise COBOL 6.1. It controls whether to ignore the
SUPPRESS phrase of COPY statements.
TUNE New option from Enterprise COBOL 6.3 with the service PTFs. It specifies the
architecture for which the executable program will be optimized.
In Enterprise COBOL 6.4, TUNE(8) and TUNE(9) are removed, and a new higher
level of TUNE(14) is accepted.
The default TUNE level matches the ARCH level if ARCH is specified. If ARCH is
not specified, both ARCH and TUNE default to 10.
VLR New option in Enterprise COBOL 5.1 with the service PTFs and from 5.2. It
affects the READ statement processing of variable length records that have length
conflicts. VLR(STANDARD) is the default.
For details, see “Variable length records - wrong length READ” on page 202.
VSAMOPENFS New option from Enterprise COBOL 6.1. It affects the user file status reported
from successful VSAM OPEN statements that require verified file integrity check.
XMLPARSE New option in Enterprise COBOL 5.1 with the service PTFs and from 5.2. 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 5 or 6 compilers.
XMLPARSE(XMLSS) is the default.
ZONECHECK New option in Enterprise COBOL 5.2 with the service PTFs and 6.1. It tells the
compiler to generate IF NUMERIC class tests for zoned decimal data items that
are used as sending data items.
In Enterprise COBOL 6.1 with the service PTFs and from 6.2, ZONECHECK is
deprecated but is tolerated for compatibility. Consider using NUMCHECK(ZON)
instead. For details, see NUMCHECK in the Enterprise COBOL for z/OS
Programming Guide.
188 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 39. Compiler options new with Enterprise COBOL 5 and 6 (continued)
Compiler option Comments
ZONEDATA New option from Enterprise COBOL 5.2. It tells the compiler whether data in
USAGE DISPLAY and PACKED-DECIMAL data items is valid, and if not, what the
behavior of the compiler should be.
Originally, Enterprise COBOL 5.2 at base level did not have the NOPFD suboption.
In 5.2 with the service PTFs and from 6.1, the NOPFD suboption is added to let
the compiler generate code that performs comparisons of zoned decimal data in
the same manner as COBOL 4 does when using NUMPROC(NOPFD|PFD) in COBOL
4.
To ease your migration to COBOL 5 or 6:
• If your digits, sign code, and zone bits are valid, use ZONEDATA(PFD) and the
same NUMPROC setting that you used with COBOL 4 when using COBOL 5 or 6.
• If you have invalid digits, invalid sign code, or invalid zone bits:
– If you used NUMPROC(MIG) with COBOL 4, use ZONEDATA(MIG) and
NUMPROC(NOPFD) with COBOL 5 or 6.
– If you used NUMPROC(NOPFD) with COBOL 4, use ZONEDATA(NOPFD) and
NUMPROC(NOPFD) with COBOL 5 or 6.
– If you used NUMPROC(PFD) with COBOL 4, use ZONEDATA(NOPFD) and
NUMPROC(PFD) with COBOL 5 or 6.
Note: In Enterprise COBOL 6.2 and 6.3 with the service PTFs, ZONEDATA is
deprecated but is tolerated for compatibility. Consider using INVDATA instead.
For more details, see INVDATA in the Enterprise COBOL for z/OS Programming
Guide.
For new compiler options in Enterprise COBOL 6, see Compiler options new with Enterprise COBOL 6.
The following options are modified:
//CEEOPTS DD *
NATLANG(JPN)
/*
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.
NOSTGOPT
• From Enterprise COBOL 5.1, data items can get optimized with OPT(2) even
when NOSTGOPT was in effect.
• In Enterprise COBOL 6.1 with the service PTFs and from 6.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.
NUMCHECK From Enterprise COBOL 6.3, when invalid data is found at compile time and
regardless of whether NUMCHECK(MSG) or NUMCHECK(ABD) is in effect, an error-
level message is produced and the check is removed.
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.
190 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 40. Compiler options changed with Enterprise COBOL 5 and 6 (continued)
Compiler option Comments
RULES In Enterprise COBOL 6.2 with the service PTFs and from 6.3, 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).
• LAXREDEF | NOLAXREDEF tells the compiler whether to issue warning
messages when a data item is redefined to a smaller item on any level.
From Enterprise COBOL 6.4, if there are multiple RULES specifications for a
compilation, the suboptions are additive, which means they are accumulated.
SOURCE From Enterprise COBOL 6.3 with the service PTFs, new suboptions DEC | HEX
are added to SOURCE compiler option. If SOURCE(DEC) is in effect, the line
numbers for the listing of the source will be in decimal format. If SOURCE(HEX)
is in effect, the line numbers for the listing of the source will be in hexadecimal
format.
SSRANGE The compiled-in range checks cannot be disabled at run time using the runtime
options CHECK(OFF) or NOSSRANGE.
In Enterprise COBOL 5.2 with the service PTFs and from 6.1, new suboptions
ZLEN | NOZLEN are added to the SSRANGE compiler option to control how the
compiler checks reference modification lengths.
In Enterprise COBOL 6.1 with the service PTFs and from 6.2, new suboptions MSG
| ABD are added to the SSRANGE compiler option to control the runtime behavior
of the COBOL program when a range check fails.
Note: The compiler option NOSSRANGE is still supported.
For modified compiler options in Enterprise COBOL 6, see Compiler option changed with Enterprise
COBOL 6.
The following options are removed:
192 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 41. Compiler options not available in Enterprise COBOL 5 and 6 (continued)
Compiler option Comments
NUMPROC(MIG) NUMPROC(PFD) and NUMPROC(NOPFD) are still available. If NUMPROC(MIG) is
specified, Enterprise COBOL 5 or 6 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
6, consider using the NUMCHECK compiler option to help you migrate to
NUMPROC(PFD):
1. Compile your programs with NUMCHECK(ZON,PAC) and NUMPROC(PFD).
2. Run a thorough regression test with a good breadth of input data.
If your applications get no NUMCHECK messages or NUMCHECK abends, you can
safely compile with NUMPROC(PFD) and NONUMCHECK for production. This will
not only solve the invalid data problem, but NUMPROC(PFD) is the most efficient
setting for the NUMPROC compiler option.
For details, see NUMCHECK in the Enterprise COBOL for z/OS Programming Guide.
SIZE
• In Enterprise COBOL 5.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 5 and 6” on page 194.
• From Enterprise COBOL 5.2, the SIZE option has been removed.
For removed compiler options in Enterprise COBOL 6, see Compiler option not available in Enterprise
COBOL 6.
The following options were obsolete in Enterprise COBOL 4, but were tolerated with informational or
warning messages to ease migration from 3 or prior versions. With Enterprise COBOL 5 and 6, these
options are no longer tolerated, and specifying any of them will result in an error message.
• CMPR2
• EVENTS
• FDUMP
• FLAGSAA
• PFDSIGN
• RES
For a detailed list of options supported for the various compiler versions, see Appendix E, “Option
comparison,” on page 295.
For a detailed list of compiler options that can affect performance, see How to tune compiler options to get
the most out of COBOL 6 in the Enterprise COBOL Performance Tuning Guide.
For detailed descriptions of all the compiler options, see Compiler options in the Enterprise COBOL
Programming Guide.
194 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• The compiler output is in GOFF format. This format allows the compiler to create more efficient
generated code and also to put out the NOLOAD debug information (DWARF) segments.
• There is no SYSDEBUG data set created for debug information.
• Compiler listing format and contents differ from prior versions of Enterprise COBOL. You can find details
on these changes in the Enterprise COBOL Programming Guide.
• Starting in Enterprise COBOL 6.1, the build level information (of the form PYYMMDD) is always included
in the header of the listing file, which assists with determining the maintenance level of the compiler.
Here is an example of the listing header:
• In Enterprise COBOL 5 and 6.1, the diagnostic messages are in the middle of the listing. In Enterprise
COBOL 6.2 and later versions, the diagnostic messages are at the bottom of the listing as with
Enterprise COBOL 4 and earlier compilers.
• Several compiler limits are increased with Enterprise COBOL 5 and 6. For details, see Appendix F,
“Compiler limit comparison,” on page 319.
• Starting in Enterprise COBOL 6.3, listing terminologies change as follows:
– STATIC MAP in Enterprise COBOL 6.2 and earlier versions is changed to INITIAL HEAP STORAGE
MAP.
– Writeable static area (WSA) in Enterprise COBOL 6.2 and earlier versions is changed to storage.
– WSA24 in Enterprise COBOL 6.2 and earlier versions is changed to BELOW THE LINE STORAGE.
– AUTOMATIC MAP in Enterprise COBOL 6.2 and earlier versions is changed to STACK STORAGE MAP.
• Starting in Enterprise COBOL 6.3, the installation customization for placing compiler phases into shared
storage is removed, since in modern systems most users have lots of storage available, and do not need
to conserve storage by placing compiler phases in shared storage. As a result of this change to the
compiler, the language for placing compiler phases in shared storage is no longer supported, so if you
have a saved copy of the IGYCDOPT customization that has a specification of compiler phases being IN
or OUT of shared storage, that language must be removed before you can assemble IGYCDOPT. If you do
not have any statements in IGYCDOPT that specify IN or OUT for compiler phases, then you will not be
affected by this change.
• The use of passing a file-name to a subprogram with the USING phrase of the CALL statement was
removed in Enterprise COBOL 6.3, but is restored in Enterprise COBOL 6.3 with PTF for APAR PH20724
installed.
If you are using IBM Enterprise COBOL Value Unit Edition (VUE) for z/OS 5.2 and later versions, you
cannot invoke the compiler multiple times from the same task (for example, invoking the compiler
multiple times from the same task by using the MVS LINK macro).
With Enterprise COBOL 5 and 6, the attributes are not changed and the attempt to write to the file fails.
The file attributes will be
DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)
With earlier versions of Enterprise COBOL, the compiler could write to a pre-allocated PDS object file with
no specific attributes from a previous compile step. This is not supported with Enterprise COBOL 5 and 6.
For example, with Enterprise COBOL 4, the compiler could write to a pre-allocated PDS or PDSE with no
specified attributes (DISP=MOD) from a previous step. The compiler will create an object file of attributes:
With Enterprise COBOL 5 and 6, DISP=MOD is not supported for PDS or PDSE data sets.
If the PDS has undefined format (such as ouput from a previous step with no DCB), and you use
DISP=SHR or DISP=OLD, Enterprise COBOL 5 will write but will not change the attributes. They will
be left as:
DCB=(RECFM=FB,LRECL=80,BLKSIZE=3200)
196 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• IGYWCPLG
• IGYWPL
The catalogued procedures that ship with Enterprise COBOL 5 and 6 have been modified.
• IGYWC
• IGYWCL
• IGYWCLG
//CEEOPTS DD *
NATLANG(JPN)
/*
Starting in Enterprise COBOL 6.3, new cataloged procedures for doing compilation have been provided to
help developing COBOL AMODE 64 (64-bit) programs. The AMODE 64 support is a new feature introduced
to Enterprise COBOL 6.3. See Developing AMODE 64 programs (Enterprise COBOL for z/OS Programming
Guide) for details about AMODE 64 support.
198 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
1. Compile with SSRANGE, NUMCHECK, PARMCHECK, INITCHECK, and OPT(0), and then run
regression tests.
2. 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 6.2, 6.1, and 5.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 5 or 6.
• In a rare scenario, valid data using COMPUTE and ROUNDED may return different results with Enterprise
COBOL 5 and 6 as compared to earlier COBOL versions.
In this scenario, if the last operation on a COMPUTE statement with ROUNDED 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 4 are now supported with 5
and 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
The resolved AMODE and RMODE settings depend on the COBOL language constructs used, the
compiler options specified, the binder options specified, and the AMODE and RMODE attributes of the
input object modules that are bound into the executable module.
• In some cases, AMODE 24 execution is not supported and the applications must run in AMODE 31. For
details, see “Restrictions for AMODE” on page 201.
• For applications compiled with Enterprise COBOL 5 or 6, the compiled-in range checks cannot be
disabled at run time using the runtime option CHECK(OFF) or NOSSRANGE .
• The ILBOABN0 interface for requesting an ABEND in a COBOL environment can be called dynamically
with Enterprise COBOL 5 and later versions. When called by a program compiled with the Enterprise
COBOL compiler, it will have the same result as calling CEE3ABD using ACTION code 1.
You are strongly recommended to migrate and use the CEE3ABD interface, because the CEE3ABD
interface provides extra flexibility to control the level of details provided in the CEEDUMP produced.
When your application is called by Enterprise COBOL programs, it might ABEND in an unexpected way
if it has an older version of ILBOABN0 (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.
• The IGZERRE and ILBOSTP0 interfaces for managing a reusable COBOL environment are not supported
for applications containing programs compiled with Enterprise COBOL 5 or 6.
200 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
- 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 6.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.
CHECK(OFF) CHECK(OFF) does not disable runtime subscript range checking for COBOL 5 or 6
programs compiled with SSRANGE.
NOSSRANGE The NOSSRANGE runtime option does not disable runtime subscript range
checking for COBOL 5 or 6 programs compiled with SSRANGE.
Note: The NOSSRANGE compiler option is still fully supported.
STORAGE In a few special cases with COBOL 5, STORAGE initial values for HEAP no longer
affect WORKING-STORAGE initial values. For details about the cases, see the
discussion of the HEAP option above.
202 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• If you specify VLR(STANDARD), you get File Status 04 when READ statements encounter a record
length conflict or "wrong length READ". Using this setting, you can check for FS=04 and then add
code to avoid accessing undefined data in a record and also avoid getting protection exceptions for
attempting to reference a part of the record that was truncated.
If your program performs a "wrong length READ" and your code checks for File Status=0 after
reading variable-length record files, your code will take the "Not zero" path. You can change your code
to test for FS=0, while FS=4 and other values will all be a failed READ. For FS=4, you can add code to
avoid the bad data in variables or protection exceptions.
Using VLR(STANDARD) can result in more reliable code and fewer I/O problems because the file status
will tell you when a "wrong length READ" might occur. A new compiler message, MSGIGYP3178, can also
help you avoid I/O problems by telling you if a program has a possibility of a "wrong length READ". This
message can be used to assist with migration from VLR(COMPAT) to VLR(STANDARD) by indicating the
possible "wrong length READ" that you can solve by correcting the File Definition (FD). You can also raise
the severity of the message so that the program must be corrected in order to run. To do this, use the
MSGEXIT suboption of the EXIT compiler option to change the severity of message MSGIGYP3178 from
I (RC=0) to S (RC=12), E (RC=8), or W (RC=4). If you are not interested in seeing this message, you can
suppress the message completely.
Results:
– For COBOL 2, 3, and 4: 128 bytes of 'C' were moved
– For COBOL 5 and 6: 1 byte of 'C' and 127 bytes of junk were moved
• Programs with parameter length mismatches:
PROGRAM-ID. SUBP.
LINKAGE SECTION.
01 GRP2 PIC X(500).
PROCEDURE DIVISION USING GRP2
MOVE 'STUFF' TO GRP2(300:20) *> This is illegal!
Results:
In the example above, GRP1 and GRP2 lengths do not match. The MOVE to GRP2 results in an overlay of
storage following the last data item in WORKING-STORAGE in the calling program.
– For COBOL 2, 3 and 4: The illegal MOVE did not result in a failure because there was usually
unused storage after the last data-item in WORKING-STORAGE (see CALLER), so the overwrite went
undetected.
– For COBOL 5 and 6: The file control blocks immediately follow the last data-item in WORKING-
STORAGE. Therefore, the file-status information in the CALLER gets overlaid, which can subsequently
change the flow of the program.
• Programs using zoned decimal data (numeric with USAGE DISPLAY) with bad zone bits in numeric
comparisons. In this example, byte 3 of VAR2 is x'40' that has zone bits x'4', which is invalid; all zone
bits must be x'F'.
WORKING-STORAGE SECTION.
01 VAR1 PIC X(5) VALUE '00 0'. <* Value x'F0F040F0'
02 VAR2 REDEFINES VAR1 PIC 9(5).
. . .
IF VAR2 = ZERO
DISPLAY "EQUAL TO ZERO"
ELSE
DISPLAY "NOT EQUAL TO ZERO"
END-IF.
Results:
– For COBOL 4 with NUMPROC(MIG) and COBOL 5.1 with OPT(0), the program displays "EQUAL TO
ZERO"
– For COBOL 4 with NUMPROC(PFD) or NUMPROC(NOPFD), and COBOL 5.1 with OPT(1) or OPT(2), the
program displays "NOT EQUAL TO ZERO"
If you have invalid digits, invalid sign codes, or invalid zone bits in your data, change your programs or
systems so that your programs do not have invalid data in numeric data items at run time.
When you have corrected your programs or systems, you can use the preferred NOINVDATA option.
Only if you cannot contain this work and must continue to run with invalid data, consider the following
choices for the INVDATA option:
– If you used NUMPROC(MIG) with COBOL 4, use INVDATA(FORCENUMCMP, NOCLEANSIGN) and
NUMPROC(NOPFD) with COBOL 6.
– If you used NUMPROC(NOPFD) with COBOL 4, use INVDATA(NOFORCENUMCMP,CLEANSIGN) (or
simply INVDATA) and NUMPROC(NOPFD) with COBOL 6.
– If you used NUMPROC(PFD) with COBOL 4, use INVDATA(NOFORCENUMCMP,CLEANSIGN) (or simply
INVDATA) and NUMPROC(PFD) with COBOL 6.
Notes®:
– If you completed migration from COBOL 4 or earlier versions to COBOL 5 or 6 in the past and used
the deprecated ZONEDATA(MIG) option in COBOL 5 or 6 and are satisfied with the behavior, use
INVDATA(FORCENUMCMP, CLEANSIGN) instead of ZONEDATA(MIG).
– IBM recommends that you correct your programs and/or data and use the NOINVDATA option.
204 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
If your data doesn't always have the correct zone bits in zoned decimal data items, compile with the
INVDATA(FORCENUMCMP) compiler option so that the zone bits will always be ignored.
• For programs using zoned decimal data with invalid zone bits, the SEARCH ALL statement may produce
different results between Enterprise COBOL 4 and later versions (COBOL 5 and 6.1). In Enterprise
COBOL 6.2, the SEARCH ALL statement behaves according to the INVDATA option as described in the
previous bullet. Use any legal form of the INVDATA option to produce the same behaviour as Enterprise
COBOL 4 or earlier versions.
When the COBOL 6.2 runtime library enablement PTF is applied to the Language Environment, SEARCH
ALL statement will behave according to the INVDATA option as described in the previous bullet. This
is available for all COBOL 5 and 6 programs without recompilation. Use any legal form of the INVDATA
option to produce the same behaviour as Enterprise COBOL 4 or earlier versions.
Note: It is not always possible to entirely match the behaviour of the old compiler even with these
options when faced with clearly invalid data.
This only affects programs with invalid zoned decimal data. If there are no invalid zone bits, the SEARCH
ALL statement produces the same result regardless of the setting of the INVDATA option.
ILBOABN0 considerations
The ILBOABN0 interface for requesting an ABEND in a COBOL environment can be called dynamically with
Enterprise COBOL 5 and later versions. When called by a program compiled with the Enterprise COBOL
compiler, it will have the same result as calling CEE3ABD using ACTION code 1.
You are strongly recommended to migrate and use the CEE3ABD interface, because the CEE3ABD
interface provides extra flexibility to control the level of details provided in the CEEDUMP produced.
When your application is called by Enterprise COBOL programs, it might ABEND in an unexpected way if it
has an older version of ILBOABN0 (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.
206 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
2. Press Enter.
3. (Optional) Press Page back.
With Enterprise COBOL 6.2, the diagnostic messages are again at the bottom of the listing, as with
Enterprise COBOL 4 and earlier compilers.
A: For AMODE 31
The following description applies when the program is compiled with LP(32):
How to find the PPA4 (Program Prolog Area 4) in a dump?
1. Find the start of the program in the dump from the traceback.
2. At the starting address + x'0C' is an offset value. This is the offset to the PPA1 from the start of the
program.
3. Starting address + PPA1 offset = PPA1.
4. Go there in the dump.
5. At PPA1 + x'04' is an offset value. This is the offset to the PPA2 from the start of the program.
PPA4 layout
For information about the layout of PPA4 and each PPA4 offset, length, and description, see COBOL V5+
32-bit PPA4 layout in the z/OS Language Environment Vendor Interfaces.
Next, you need to know some terminology.
Terms to know
NORENT static area
This storage area is allocated in the executable for each program that was compiled with NORENT. A
NORENT program’s WORKING-STORAGE will be located here.
LE’s writable static area (WSA)
Every COBOL 5 or 6 program object (executable) has this storage area.
RENT static area
This storage area is allocated inside the WSA for every program that is statically bound into the
executable and compiled with RENT. Each program has their own RENT static area. A program’s
WORKING-STORAGE may or may not be located here.
Program static area
This storage area is allocated outside of the WSA only if certain conditions are met. In those cases, the
program’s WORKING-STORAGE will be located here, instead of in the RENT static area.
Next, you need to understand that there are three locations where WORKING-STORAGE can reside.
208 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
| | | STORAGE MAP in Program A's listing) | | |
| | |---------------------------------------| | |
| | | |
| | | |
| | Program B - RENT static area | |
| | |---------------------------------------| | |
| | | (Corresponds to the INITIAL HEAP | | |
| | | STORAGE MAP in Program B's listing) | | |
| | |---------------------------------------| | |
| | | |
| | | |
| |---------------------------------------------| |
| |
| |
| |
| Program A - program static area |
| |---------------------------------------------| |
| | (Corresponds to the WORKING-STORAGE MAP | |
| | (or the BELOW THE LINE STORAGE MAP) in | |
| | Program A's listing) | |
| |---------------------------------------------| |
| |
| |
| Program B - program static area |
| |---------------------------------------------| |
| | (Corresponds to the WORKING-STORAGE MAP | |
| | (or the BELOW THE LINE STORAGE MAP) in | |
| | Program B's listing) | |
| |---------------------------------------------| |
| |
|---------------------------------------------------|
Once you understand the three areas where WORKING-STORAGE could reside, you need to know how
to determine where a program’s WORKING-STORAGE actually does reside. For details, see WORKING-
STORAGE location and Layout of the Language Environment WSA, STATIC, PROGRAM STATIC, and User
Working Storage in IGZXAPI in the z/OS Language Environment Vendor Interfaces.
Notes:
1. In COBOL 5, there is a WSOPT compiler option. In COBOL 6, there is no longer a WSOPT compiler
option, but rather a signature information bit for WSOPT that is automatically set by the compiler.
2. For SPANNED RECORDS, the WSOPT signature information bit is OFF. For NO SPANNED RECORDS,
the WSOPT signature information bit is ON.
• You can scan your programs for 'RECORDING MODE' and look for any files set to 'S' to determine if
SPANNED RECORDS are used.
• Another alternative is to check the signature information bytes in the listing for the WSOPT bit,
which is signature byte 8, bit 3. For example, take the following from a listing:
Byte 8 is x'10', which is b'00010000'. Numbering the bits from left to right as 01234567, because
bit 3 is on, WSOPT is on.
Once you know what area the WORKING-STORAGE resides in, then you will know how to find it.
Once you find these areas in a dump, then you can compare that to the compile listing.
In a COBOL listing:
• The INITIAL HEAP STORAGE MAP shows the layout of the RENT static area or the NORENT static area.
• The WORKING-STORAGE MAP or the BELOW THE LINE STORAGE MAP shows the layout of the program
static area.
B: For AMODE 64
The following information applies when the program is compiled with LP(64):
210 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Information about the WORKING-STORAGE SECTION can be found in the PPA4 of the program together
with the Heap Storage Address Table. Follow the steps below to locate them.
1. Find the entry point address of the program in the dump from the traceback. In the LE CEEDUMP
traceback, this is the address under the "E Addr" column corresponding to the row of the program.
In the example below, HELLO is the COBOL program. Its entry point address is X'260000A8'. This
address should contain the first executable instruction of the program, that is, an STMG instruction.
Traceback:
DSA Entry E Offset …
1 CEEHDSP +00003F3C
2 CELQHROD +00000266
3 HELLO +00000224
4 CELQINIT +00001D0C
2. At program entry point offset -x'08', that is, before the entry point, there is an integer value. This value
is the offset from the entry point address to PPA1.
3. At PPA1+x'04', there is an offset value. This is the offset from the entry point address to PPA2.
4. At PPA2+x'08', there is an offset value. This is the offset from PPA2 to PPA4.
5. At PPA4+x'7C', there is an offset value. This is the offset from the environment of the program to the
Heap Storage Address Table.
Environment here refers to the XPLINK environment of the program. This is the address in register R5 on
entry into the program. The first instruction of the program, the STMG, stores the register to the stack. The
contents of R5 can be found in the dump.
Heap Storage Address Table
Offset of this table from the environment of the program is in PPA4+X'7C'.
Data items in WORKING-STORAGE SECTION in LP(64) are by default allocated above the bar. They are
in COBOL's ABOVE THE BAR HEAP. Its starting address is in the first field of the Heap Storage Address
Table (at offset X'00' of this table). Note that this address corresponds also to the ABOVE THE BAR HEAP
MAP section in the compilation listing, which provides information about level 77 and 01 data items in the
WORKING-STORAGE SECTION.
There are also COBOL control areas and compiler internal variables allocated in the ABOVE THE BAR
HEAP. The first WORKING-STORAGE data item in the program might not reside right at the beginning. The
offset of the first data item in the program's WORKING-STORAGE SECTION can be found in PPA4 offset
+X'40'.
For information about the layout of PPA4 and each PPA4 offset, length, and description, see COBOL 64-bit
PPA4 layout in the z/OS Language Environment Vendor Interfaces.
Related tasks
Reading LIST output (Enterprise COBOL for z/OS Programming Guide)
Related references
Example: Program prolog areas (Enterprise COBOL for z/OS Programming Guide)
Common interfaces and conventions (z/OS Language Environment Vendor Interfaces)
212 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Chapter 18. Adding Enterprise COBOL 5 or 6
programs to existing COBOL applications
When you add an Enterprise COBOL 5 or 6 program to an existing application, you are either recompiling
an existing program with Enterprise COBOL 5 or 6 or including a newly written Enterprise COBOL 5 or 6
program.
Note: You should use this Migration Guide only if you have completed the runtime migration to Language
Environment. This means that the following conditions have been met:
• The Language Environment data set SCEERUN is installed in LNKLST or LPALST.
• There are no instances of COBLIB, VSCLLIB, or COB2LIB in LNKLST or LPALST.
• There are no instances of COBLIB, VSCLLIB, or COB2LIB in JCL STEPLIB or JOBLIB statements or in
CICS startup JCL.
• All statically bound runtime library routines for programs that are compiled with NORES have been
REPLACEd with routines from Language Environment.
• IGZEBST bootstrap modules for VS COBOL II programs that are compiled with RES were either linked
with the VS COBOL II runtime version of IGZEBST that has APAR PN74000 applied, or IGZEBST was
REPLACEd with IGZEBST from Language Environment.
If these steps have not been completed, please first complete all runtime migration activities in the
Enterprise COBOL 4.2 Compiler and Runtime Migration Guide at http://publibfp.dhe.ibm.com/epubs/pdf/
igy3mg50.pdf prior to following the steps here.
When you add Enterprise COBOL 5 or 6 programs to your existing applications, you have the ability to:
• Upgrade your existing programs incrementally, as your shop's needs dictate
• Use Language Environment condition handling
If you have a program object that includes a COBOL program linked with C, C++, or Enterprise PL/I
programs, the program object has slightly different behavior when the COBOL program is changed to
Enterprise COBOL 5 or 6. This occurs when such program objects are fetched (that is, using either C fetch
or PL/I fetch) more than once. In the subsequent fetches, external and static variables in these other LE
languages may retain their last used state, following COBOL rules, instead of getting their initial values.
With prior versions of COBOL linked in, the C, C++ and PL/I programs would retain C/C++ or PL/I behavior.
214 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
AMODE and RMODE considerations
Static calls between AMODE 24 and AMODE 31 programs are not supported by Enterprise COBOL 5.1.0
programs. Static calls between AMODE 24 programs and Enterprise COBOL 4.2 and earlier programs are
supported for the cases where AMODE 24 is supported for Enterprise COBOL 4.2 and earlier programs.
Note:
In addition, NORENT programs can no longer reside above the line. The following diagram shows
the types of calls that can be dynamic or static and those that can only be dynamic. It also shows
configurations of data and program location with respect to the 16 MB line.
Figure 5. Examples of valid dynamic and static calls between different AMODE and RMODE COBOL
programs
Note: For other AMODE 24 programs, no calls are allowed between Enterprise COBOL 5 or 6 programs
and either OS/VS COBOL or VS COBOL II NORES programs.
220 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Starting in Enterprise COBOL 6.3, bit 30 of flag3 (offset X'1C') of PPA1 may be set to indicate that the
Extended Flag field is present. If this bit is set, the extended flag will have bit 0 set to indicate
that Vector Registers Area is in the optional area. This should not affect tools or program code
that are accessing PPA1 according to the Language Environment interface. Refer to the z/OS Language
Environment Vendor Interfaces for details about PPA1.
When debugging your COBOL programs, you will find that there have been a large number of
improvements and behavior changes introduced with Enterprise COBOL 5 and 6. For details about
changes in debugging with IBM z/OS Debugger, see “z/OS Debugger changes with Enterprise COBOL
5 and 6” on page 221.
instead of
S9(5) DSLS
DESCRIBE ATTRIBUTES shows the length and type of symbolic characters with Enterprise COBOL 5 and
6. With prior versions of the compiler, only zeros were shown.
For condition names (level 88) , an address of 000000000 is no longer shown.
There is more compact and clearer output for an array and array element. For example:
• INDEX is displayed for type instead of IX
• The level 00 is not displayed
• There is no repetition of the type for each array element, the element type is shown only once.
z/OS Debugger no longer displays an address for DESCRIBE ATTRIBUTES of a register, such as %GPR0,
because registers do not have addresses.
STEP command
You can STEP and set breakpoints for the WHEN phrase of EVALUATE.
STEP OVER with PERFORM is now supported.
222 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Support for COBOL types
z/OS Debugger now supports the correct maximum value in all binary data types. For example, an 8-byte,
unsigned COMP-5 data item can contain a maximum value of 18,446,744,073,709,551,615, which is 20
digits.
05 ARR OCCURS 10
10 X PIC 99
10 Y PIC 99
For previous versions of Enterprise COBOL, when you list a single element of an array, the format of the
output is as if it is an array of size 1. For Enterprise COBOL 5 and 6, the output is the same as a variable of
the given type, not as an array of size 1.
Other changes
The AT CALL entry name is not supported for Enterprise COBOL 5 and 6.
Several changes are implemented for the DESCRIBE CUS command. These changes are:
• New compiler name: IBM COBOL 5.2.0
• Time Stamp is displayed: * Compiler: IBM COBOL 5.2.0 2014/11/27 13:08
• There have been many changes to compiler options.
• The type of linkage is displayed: * Its linkage is Language Environment FastLink. This is
the default linkage for the compiler.
Line numbering with the NUM option and sequence of programs is different with Enterprise COBOL 5 and
6. In prior versions, a batch compile (sequence of programs in a single source) with NUM and NOLIB the
line numbers start over in the second program. With Enterprise COBOL 5 and 6, the NOLIB option has
been removed. The compiler behaves as though LIB is always enabled and therefore the second program
in a sequence has line numbers that continue from those of the first program.
224 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• With programs compiled by Enterprise COBOL 5 and 6, nested programs will now show in the Debug
View.
• COBOL language provides a DECLARATIVES section to handle exceptional conditions. With Enterprise
COBOL 5 and 6, when a DECLARATIVES section gets control in a z/OS Debugger session, the debug view
shows a separate frame for it.
OS/VS COBOL programs no longer run under CICS. Any OS/VS COBOL programs to be run under CICS
must be upgraded to Enterprise COBOL.
The IGZ* and CEE* modules are contained in the SCEERUN data set.
IEWBNDD is contained in SYS1.SIEAMIGE.
IEWBIND is contained in SYS1.MIGLIB and possibly LPA.
* The IGZUOPT module is not contained in SCEERUN by default. IGZUOPT is an optional module that can
be created as needed by using the sample JCL members IGZ1OPT, IGZ2OPT, IGZ3OPT, or IGZ4OPT in
SCEESAMP.
IGZUOPT is also not included in the SCEESAMP(CEECCSD) sample. If in use, it can be added to
SCEESAMP(CEECCSD).
Related tasks
Suppressing information in CEEDUMP processing (IGZ1OPT) (Enterprise COBOL for z/OS Programming
Guide)
Controlling suppress of OS/VS COBOL warning messages (IGZ2OPT)
Requesting QSAM buffer above the line (IGZ3OPT)
Controlling initiation of QSAM buffer (IGZ4OPT)
228 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 47. Compiler options for programs that run under CICS
Compiler
options Comments
CICS The CICS compiler option enables the integrated CICS translator capability. The CICS option
must be specified if the source program contains CICS statements and has not been
processed by the separate CICS translator.
The CICS option requires that the NODYNAM and RENT options also are in effect. Enterprise
COBOL forces on these options if DYNAM, or NORENT are specified at the same level as the
CICS option.
The CICS translator option COBOL3 is recommended, although COBOL2 is still supported.
Choose the COBOL2 option if you are retranslating old programs that require the use
of temporary variables. In particular, note that the use of temporary variables might
circumvent errors that would normally occur when an argument value in a program is
incorrectly defined. The COBOL2 option provides declarations of temporary variables.
Because of this feature, incorrect definitions of argument values might be present, but not
noticeable at run time, in programs that were translated with COBOL2. Translating these
programs with the COBOL3 option can reveal these errors for the first time.
For example, suppose you coded:
DBCS The DBCS option is the default for Enterprise COBOL. It might cause problems for CICS
programs if you are using the COBOL2 CICS translator option. The fix is to use the COBOL3
translator option.
NODYNAM NODYNAM is required for programs translated by the CICS translator because the CICS
command-level stub cannot be dynamically called.
Note: Dynamic calls are supported under CICS by the use of the CALL identifier format of
the CALL statement, or by the use of the >>CALLINTERFACE DYNAM directive.
RENT RENT is required for CICS programs. RENT causes the compiler to produce reentrant code
and allows you to place the COBOL modules in the LPA (Link PackAarea) or ELPA (Extended
Link Pack Area) and thus shared among multiple address spaces under CICS. Also, the
modules cannot be overwritten, since the LPA and ELPA are read-only storage.
For a full list of CICS translator options, see Defining translator options in the Developing CICS
Applications.
• Move all CBL/PROCESS statements to the first lines of the source program. The integrated CICS
translator does not accept comment lines preceding a CBL/PROCESS statement. The source program
must conform to Enterprise COBOL rules.
• Check if you have nested programs that redefine DFHCOMMAREA. The integrated translator will
not generate declarations of DFHCOMMAREA or DFHEIBLK in nested programs. DFHCOMMAREA and
DFHEIBLK declarations are generated in the outermost program with the GLOBAL attribute specified.
COBOL programs that depend on these generated declarations within nested programs require source
changes.
230 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• Enhancements in interactive debugging of COBOL applications with Debug Tool. The application can be
debugged at the original source level, instead of at the level of the expanded source produced by the
CICS translator.
• EXEC CICS or EXEC DLI statements can reside in copybooks, eliminating the need to translate them
with an external translator before compilation.
• There is no longer a need for an intermediate data set to hold the translated version (before the
program has been compiled) of the source program.
• There is only one output listing instead of two.
• Using nested programs that contain EXEC CICS statements is simplified. DFHCOMMAREA and
DFHEIBLK are generated in the outermost program with the GLOBAL attribute specified on the
PROCEDURE DIVISION USING of nested programs.
• Nested programs that contain EXEC CICS statements can be held in separate files and included through
a COPY statement.
• REPLACE statements can now affect EXEC CICS statements.
• Binary fields in CICS control blocks are generated with USAGE COMP-5 instead of BINARY. Thus, there
is no longer a dependency on the setting of the TRUNC compiler option. Any setting of the TRUNC option
can be used with CICS applications that use the integrated translator, subject only to the requirements
of the user-written logic within the application.
Note: CICS 5.2 and later versions support the EXCI translator option with the integrated CICS translator.
In earlier versions than CICS 5.2, the CICS documentation states that the EXCI translator option is not
supported for programs compiled with the integrated CICS translator, but CICS has reversed this position.
You can also compile with the EXCI translator option and ignore the warning message DFH7006I.
Table 48. Key compiler options for the integrated CICS translator
Compiler option Comments
CICS The CICS compiler option enables the integrated CICS translator capability. The CICS
option must be specified if the source program contains CICS statements and has not
been processed by the integrated CICS translator.
The CICS option requires that the NODYNAM, and RENT options also are in effect.
Enterprise COBOL forces on these options if DYNAM or NORENT are specified at the
same level as the CICS option.
If NOCICS option is specified, any CICS statements found in the source program will
receive S-level messages and be discarded.
NODYNAM NODYNAM is required for programs translated by the CICS translator because the CICS
command-level stub cannot be dynamically called.
Note: Dynamic calls are supported under CICS by the use of the CALL identifier format of
the CALL statement, or by the use of the >>CALLINTERFACE DYNAM directive.
RENT RENT is required for CICS programs. RENT causes the compiler to produce reentrant
code and allows you to place the COBOL modules in the LPA or ELPA and thus shared
among multiple address spaces under CICS. Also, the modules cannot be overwritten,
since the LPA and ELPA are read-only storage.
232 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Chapter 21. Db2 coprocessor conversion
considerations
When you upgrade programs that use the Db2 precompiler to instead use the Db2 coprocessor, you need
to be aware of differences in language elements and in code-page conversions.
Consider the following topics:
• Db2 coprocessor integration
• Language elements
• Code-page conversion
Starting with Db2 8 you can no longer use the Db2 precompiler for OS/VS COBOL programs. In addition,
you cannot mix OS/VS COBOL with Enterprise COBOL. Therefore, if a program needs to be changed, it
must be upgraded to Enterprise COBOL.
IDENTIFICATION DIVISION.
PROGRAM-ID.COBTEST.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 RES PIC X(10).
EXEC SQL
INCLUDE SQLCA
END-EXEC.
PROCEDURE DIVISION.
EXEC SQL
SELECT COL1 INTO :RES FROM TABLE1
END-EXEC.
GOBACK.
IDENTIFICATION DIVISION.
PROGRAM-ID.COBTEST.
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 RES PIC X(10).
EXEC SQL
INCLUDE SQLCA
END-EXEC.
PROCEDURE DIVISION.
EXEC SQL
SELECT COL1 INTO :RES FROM TABLE1
END-EXEC.
GOBACK.
//SYSLIN DD DSN=&&LOADSET,DISP=(MOD,PASS),UNIT=SYSDA,
//SPACE=(800,(500,500))
//SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=*
234 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
//SYSUT1 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT2 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT3 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT4 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT5 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT6 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT7 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT8 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT9 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT10 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT11 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT12 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT13 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT14 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSUT15 DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
//SYSMDECK DD UNIT=SYSDA,SPACE=(800,(500,500),,,ROUND)
Language elements
There are some differences in the way certain aspects of SQL code are handled between the separate
precompiler and the integrated coprocessor. View the following items to take into account these
differences when you change to using the coprocessor.
Continuation lines
Precompiler: Requires that an EXEC SQL statement start in columns 12 through 72; continuation
lines of the statement can start anywhere in columns 8 through 72.
Coprocessor: Requires that all lines of an EXEC SQL statement be coded in columns 12 through 72,
including continuation lines.
Action to migrate to coprocessor: Move any continuation of EXEC SQL statements that start in
columns 8 through 11 over to start in columns 12 through 72.
FOR BIT DATA host variables
Precompiler: A COBOL alphanumeric data item can be used as a host variable to hold Db2 character
data that has subtype FOR BIT DATA. An explicit EXEC SQL DECLARE VARIABLE statement that
declares the host variable in question as FOR BIT DATA is not required with the precompiler.
Coprocessor: A COBOL alphanumeric data item can be used as a host variable to hold Db2 character
data having subtype FOR BIT DATA only if:
• You specify the NOSQLCCSID compiler option, or
• An explicit EXEC SQL DECLARE VARIABLE statement for the host variable is specified in the COBOL
program. For example:
If you use the Db2 DCLGEN command to generate COBOL declarations for a table, you can create
the EXEC SQL DECLARE statements automatically. To do so, specify the DCLBIT(YES) option of the
DCLGEN command.
Action to migrate to coprocessor:
• Use DCLGEN to add the explicit EXEC SQL DECLARE VARIABLE FOR BIT DATA statement to the data
declarations for any data items that are used as bit data and not just as character data.
• Add the explicit EXEC SQL DECLARE VARIABLE FOR BIT DATA statement to the data declarations
manually.
• Use the NOSQLCCSID compiler option.
Multiple definitions of a host variable
Precompiler: Does not require host variable references to be unique.
The first definition that maps to a valid Db2 data type is used.
Coprocessor: Requires that all host variables references be unique.
IF A = B THEN
EXEC SQL INCLUDE somecode END-EXEC.
ELSE
...
END-IF
statement.
REPLACE and EXEC SQL statements
Precompiler: COBOL REPLACE statements and the REPLACING phrase of COPY statements act on the
expanded source created from EXEC SQL statements.
Coprocessor: COBOL REPLACE statements and the REPLACING phrase of COPY statements act on
the original source program including EXEC statements, which can result in different behavior in the
following examples:
With the precompiler the reference to G.ABC will be displayed as ABC OF G in the expanded source
and will be replaced with XYZ OF G. With the coprocessor, replacement will not occur because ABC is
not delimited by separators in the original source string G.ABC.
Action to migrate to coprocessor: Change your code to either REPLACE the qualified references (for
example G.ABC) as well as the unqualified references:
Or change code so that qualification is not required, stop using REPLACE for such data items, or any
other means to allow the COBOL programs changed by REPLACE to compile cleanly.
Source code that follows END-EXEC
Precompiler: Ignores any code that follows the END-EXEC on the same line.
Coprocessor: Processes the code that follows the END-EXEC on the same line.
236 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Note: This includes a period that follows END-EXEC, so that using the integrated SQL coprocessor
with SQL statements that have periods on the same line as the END-EXEC should be changed. The
periods should be removed since they were ignored in the precompiler case.
Action to migrate to coprocessor: add the floating comment indicator *> after the END-EXEC phrase.
SQL-INIT-FLAG
Precompiler: If you pass host variables that might be located at different addresses when the
program is called more than once, the called program must reset SQL-INIT-FLAG. Resetting this flag
indicates to Db2 that storage must be initialized when the next SQL statement runs. To reset the flag,
insert the statement MOVE ZERO TO SQL-INIT-FLAG in the PROCEDURE DIVISION of the called
program, ahead of any executable SQL statements that use the host variables.
Coprocessor: The called program does not need to reset SQL-INIT-FLAG. An SQL-INIT-FLAG is
automatically defined in the program to aid in program portability. However, statements that modify
SQL-INIT-FLAG, such as MOVE ZERO TO SQL-INIT-FLAG, have no effect on the SQL processing in
the program.
Action to migrate to coprocessor: Optionally remove references to SQL-INIT-FLAG, they are not used
and not needed.
SYSLIB and COPY versus EXEC SQL INCLUDE
Precompiler: The precompiler has a separate SYSLIB concatenation from the compiler, so that
a specific member name, like 'member1', might refer to two different members using EXEC SQL
INCLUDE 'member1' during precompilation and COPY 'member1' during compilation.
Coprocessor: There is only one SYSLIB concatenation for both EXEC SQL INCLUDE statements and
COPY statements. In this case, you cannot use a single name to refer to two different members.
Action to migrate to coprocessor: Rename the SQL INCLUDE member or the copybook member, and
make corresponding source code changes to the SQL INCLUDE or COPY statements involved.
Code-page conversion
There are differences in the way character conversion is handled between the separate precompiler and
the integrated coprocessor. View the following items to take into account these differences when you
change to using the coprocessor.
Code-page coordination between COBOL and Db2 for SQL statements
Precompiler: There is no coordination. The code page for processing SQL statements is determined
from Db2 external mechanisms and defaults
Coprocessor: Code-page coordination between COBOL and Db2 for SQL statements is dependant on
the SQLCCSID compile option:
• SQLCCSID:
– The COBOL CODEPAGE(ccsid) compiler option affects processing of host variables in COBOL
statements and SQL statements.
– CCSID processing is compatible with the SQL coprocessor in Enterprise COBOL 3.4.
– The ccsid specified in the CODEPAGE compiler option must match the ccsid in DSNHDECP for the
database encoding.
• NOSQLCCSID (recommended):
– The CODEPAGE(ccsid) compiler option only affects processing of COBOL statements, it is not
used for processing SQL statements.
– The code page for processing SQL statements is determined from Db2 external mechanisms such
as DSNHDECP and defaults.
For more information about SQLCCSID and NOSQLCCSID, see the Enterprise COBOL for z/OS
Programming Guide section "COBOL and Db2 CCSID determination".
If you have COBOL programs that are used as these types of IMS user exits, the programs cannot be
compiled with COBOL 5 or 6. The exception is when the actual exit is an assembler program in a PDS data
set that LOADs and calls a COBOL 5 or 6 program in a PDSE. To handle the cases with COBOL 5 or 6 and
these users exits, you have the following choices:
• If the exit routine is COBOL, do not recompile with COBOL 5 or 6, but keep using the older COBOL
version.
• If the exit routine is COBOL, change to use an assembler program that LOADs COBOL 5 or 6, or an older
COBOL program that does a dynamic CALL to COBOL 5 or 6 for exit logic.
• If the exit routine is assembler that loads a COBOL program, recompile the COBOL program with COBOL
5 or 6, bind into a PDSE data set, and add that new data set to the concatenation.
IMS is in the process of enabling user exits for enhanced services, which allows them to be run out of
PDSE data sets. See the list of the user exit types that are enabled for the new services in IMS V11:
You can place programs compiled with the RENT option in the LPA or ELPA. There they can be shared
among the IMS dependent regions.
To run above the 16-MB line, your application program must be compiled with RENT and RMODE(ANY).
With IMS, the data for IMS application programs can reside above the 16-MB line, and you can use
DATA(31) and RENT for programs that use IMS services.
The recommended link-edit attributes for proper execution of COBOL programs under IMS are as follows:
• Link as RENT program objects that contain only COBOL programs compiled with the RENT compiler
option.
• To link program objects that contain a mixture of COBOL RENT programs and other programs, use the
link-edit attributes recommended for the other programs.
240 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Appendix A. Frequently asked questions (FAQ) and
answers
This section provides answers to some of the most common questions about upgrading to Enterprise
COBOL and Language Environment. The questions are grouped into the following categories:
• Before migration
• Compatibility
• Link-editing with Language Environment
• Compiling with Enterprise COBOL
• Language Environment services
• Language Environment runtime options
• Subsystems
• z/OS
• Performance
• Service
• Object-oriented syntax, and Java 6, Java 7 and Java 8 SDKs
Before migration
This topic describes frequently asked questions before migration.
• “What does COBOL migration refer to?” on page 241
• “Is migrating from COBOL 4 and earlier to COBOL 6 different than migrating from COBOL 3 to 4?” on
page 242
• “Will support end for my load modules that have been compiled with earlier versions of COBOL?” on
page 242
• “Why do I need to migrate?” on page 242
• “Are there any best practices to learn before my migration?” on page 242
• “Are there any tools to speed up migration?” on page 242
• “Do I need to recompile everything for the migration?” on page 243
• “Where can I get an overview of the complete migration process?” on page 243
• “How do I select the top CPU hitters for my first migration target?” on page 243
• “Are there any education packages available so that I can take a deep dive into migration?” on page 243
• “How can I get support if running into migration issues?” on page 244
• “Once I've migrated to 5 or 6, do I have to worry about invalid data?” on page 244
• “If I find that my programs are using invalid data at run time, but my application results are OK, can I
avoid correcting the invalid data problems?” on page 244
• “Can I measure the performance gains of a COBOL program or an application on production systems
after migration?” on page 244
Is migrating from COBOL 4 and earlier to COBOL 6 different than migrating from
COBOL 3 to 4?
Yes. Since the newer generation of COBOL compilers can use different instructions to make your COBOL
programs more efficient, they can reveal hidden and underlying issues with invalid data use at run
time. The presence of invalid data can lead to different behaviors, so additional testing is needed. Most
customers do not have this problem, but you cannot know in advance if you will run into these problems,
thus we have a new recommended migration process.
Will support end for my load modules that have been compiled with earlier versions
of COBOL?
No. The already compiled modules using z/OS LE will continue to be supported in production as long as
you’re using a supported z/OS level.
242 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• IBM Rational Test Workbench
• Rational Test Virtualization Server
Upgrade SW
PDS load Yes and HW to Your programs No
required levels compiled with V3 or
libraries?
Migrate to later?
Update COBOL
PDSE
source
No Install prerequisite
Yes
service updates
Recompile
OS/VS COBOL or Yes
Yes
VS COBOL II NORES selected programs
programs?
Keep separated, Raise region
migrate early to V5/V6, sizes Fix invalid data
No or migrate first to V4 or programs
Pass regression
No Install new
Run under LE? tests? No
compiler and PTFs
Move old Yes
Yes runtime to LE
Set default Complete
compiler options verification
Complete
preparation
Required
Complete Decision Terminal
process
installation
Optional
Connector Preparation
process
How do I select the top CPU hitters for my first migration target?
The video "How to Identify Top CPU Consuming COBOL Modules" (https://mediacenter.ibm.com/media/
1_ygabnyso) introduces a way to identify the top CPU hitters in four steps, including identifying peak
usage, identifying top job-program pairs, identifying top models, and scanning for COBOL CSECTS.
Are there any education packages available so that I can take a deep dive into
migration?
It is recommended that you watch the recorded videos for the IBM Enterprise COBOL for z/OS 6 Migration
Webinar and Performance Tuning Webinar on COBOL Migration and Performance Tuning Webinars.
The Migration Webinar helps you understand the migration process, tips, and tricks to avoid common
pitfalls, and the Performance Tuning Webinar helps you understand how to take advantage of advanced
optimization technology in the Enterprise COBOL 6 compiler to increase performance of your business-
critical applications and reduce CPU usage.
If you still have questions after watching the webinar videos, contact the COBOL experts by filling out the
questionnaire.
If I find that my programs are using invalid data at run time, but my application
results are OK, can I avoid correcting the invalid data problems?
No. For some customers who migrated successfully to COBOL 6.1 without testing invalid data, when they
moved up to COBOL 6.2 and compiled with ARCH(12) for z14 hardware, their programs started abending
on the invalid data. Invalid data could be a problem for years and should be corrected.
Compatibility
This topic describes frequently asked questions about compatibility.
• “Is Enterprise COBOL 6 compatible with earlier versions of IBM COBOL?” on page 244
• “Does my IBM COBOL compiler support the latest IBM hardware and operating systems?” on page 245
• “Can OS/VS COBOL and VS COBOL II programs call Enterprise COBOL programs?” on page 245
• “Can programs compiled with Enterprise COBOL 3 or 4 call programs compiled with Enterprise COBOL
6?” on page 246
• “Can you convert programs selectively to Enterprise COBOL?” on page 246
• “We have had errors when running COBOL programs where an output DD was misspelled and a
temporary file was created. This causes problems when it occurs with a file for a one-time program
run. Is this still a concern with Enterprise COBOL?” on page 246
• “When should you use the CMPR2 option?” on page 246
• “Is the signature area of Enterprise COBOL programs the same as for OS/VS COBOL and VS COBOL II?”
on page 246
• “How is Enterprise COBOL 6 different from previous versions?” on page 246
• “What features are removed from Enterprise COBOL 6?” on page 247
244 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
and obsolete compiler options. IBM does not expect that many applications will be affected by the
removed functions, which in practice are no longer heavily used.
It is recommended that you plan your source program upgrading by following the steps in Chapter 5,
“Planning to upgrade source programs,” on page 29. For details about source updating and recompiling,
see appropriate topics in Part 3, “Upgrading programs,” on page 43.
• Enterprise COBOL 6 is object compatible with earlier versions of IBM COBOL. This means that
applications can be constructed by using a mixture of object modules that are compiled with
COBOL 6 and those compiled with earlier versions. Both static calls (calls within a link-edited module)
and dynamic calls (calls between programs link-edited as separate modules) can be used. The following
are exceptions:
– Interoperation with object modules that are compiled with OS/VS COBOL (5740-CB1) is not
supported.
– Interoperation with object modules that are compiled with VS COBOL II (5688-958) is limited to
programs compiled with the RES compiler option. Interoperation with VS COBOL II programs that are
compiled with the NORES option is not supported.
For these OS/VS COBOL and VS COBOL II NORES programs, you must recompile them with Enterprise
COBOL 6 so that they can work in the same application with Enterprise COBOL 6 programs. For details,
see Chapter 18, “Adding Enterprise COBOL 5 or 6 programs to existing COBOL applications,” on page
213.
To improve the performance of your VS COBOL II NORES programs without recompiling, you can use the
IBM Automatic Binary Optimizer for z/OS (ABO) product. However, the interoperation between COBOL 6
programs and ABO-optimized VS COBOL II NORES programs is not supported, either.
• Enterprise COBOL 6 is runtime compatible with earlier versions of IBM COBOL. This means that
COBOL programs using valid data will continue to produce the same runtime results after being
recompiled with Enterprise COBOL 6. A small number of exception cases and how to handle invalid
data are documented in “Changes at run time with Enterprise COBOL 5 and 6” on page 198.
Does my IBM COBOL compiler support the latest IBM hardware and operating
systems?
IBM COBOL compilers support forward compatibility with IBM hardware and operating systems. There
are no known compatibility issues with running older versions of the COBOL compilers themselves on the
latest hardware (such as z16) or the latest operating systems (such as z/OS 2.5), nor are there any known
compatibility issues with running the load modules or executables of these older compilers on the latest
hardware and operating systems.
Depending on the functions used, you might require other software products such as CICS, Db2, or
IMS. For a list of hardware, operating systems, or software products compatible with your IBM COBOL
compiler, see the Software Product Compatibility Reports (SPCR) site.
Can OS/VS COBOL and VS COBOL II programs call Enterprise COBOL programs?
Under non-CICS, calls between OS/VS COBOL and Enterprise COBOL are not supported. Under CICS,
OS/VS COBOL programs cannot run at all.
Under non-CICS, calls between VS COBOL II NORES programs (that is, programs compiled with the
NORES compiler option) and Enterprise COBOL are not supported. Under CICS, VS COBOL II NORES
programs cannot run at all.
Under non-CICS and under CICS, any calls between VS COBOL II RES programs and Enterprise COBOL
programs are supported. For additional details, see the Enterprise COBOL for z/OS Programming Guide.
For a complete list of calls between COBOL and assembler (including whether they are supported or not
when running with Language Environment), see “Runtime support for assembler COBOL calls under CICS”
on page 291 .
We have had errors when running COBOL programs where an output DD was
misspelled and a temporary file was created. This causes problems when it occurs
with a file for a one-time program run. Is this still a concern with Enterprise COBOL?
Yes, for QSAM you can turn off automatic file creation with the Language Environment CBLQDA(OFF)
runtime option.
Is the signature area of Enterprise COBOL programs the same as for OS/VS COBOL
and VS COBOL II?
No, but maps of the signature area can be used to find out what compiler options were used to compile
the module, when it was compiled, release level, and so on. For details, see Reading LIST output in the
Enterprise COBOL for z/OS Programming Guide.
246 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
What features are removed from Enterprise COBOL 6?
The removed features are the Millennium Language Extensions and LABEL declaratives. Learn more
details at “COBOL source code differences in Enterprise COBOL 5 and 6” on page 183.
Are there any compiler options for finding invalid data or for performance tuning
purposes?
For finding invalid data, you can first compile with SSRANGE, NUMCHECK, PARMCHECK, INITCHECK, and
OPT(0) for initial code changes and unit tests, and then recompile with NOSSRANGE, NONUMCHECK,
NOPARMCHECK, and OPT(2) for quality assurance tests and production (2-step compile process).
• SSRANGE in the Enterprise COBOL for z/OS Programming Guide: Use SSRANGE to have the compiler
generate code that checks for out-of-range storage references.
• NUMCHECK in the Enterprise COBOL for z/OS Programming Guide: Use NUMCHECK to have the compiler
generate extra code to validate data items when they are used as sending data items.
• PARMCHECK in the Enterprise COBOL for z/OS Programming Guide: Use PARMCHECK to have the
compiler generate an extra data item following the last item in WORKING-STORAGE, and then to check
whether a called subprogram corrupted data beyond the end of WORKING-STORAGE.
• INITCHECK in the Enterprise COBOL for z/OS Programming Guide: Use INITCHECK to have the compiler
check for uninitialized data items and issue warning messages when they are used without being
initialized.
For performance tuning, Enterprise COBOL 6 offers several new and substantially changed compiler
options that can affect performance, and the recommended compiler option set for best performance
is OPT(2), ARCH(x), and TUNE(y). For more information about performance tuning, see How to tune
compiler options to get the most out of 6 in the Enterprise COBOL for z/OS Performance Tuning Guide.
To learn more migration best practices, see Chapter 4, “Migration recommendations to Enterprise COBOL
6,” on page 27.
Can you compile programs written for OS/VS COBOL with Enterprise COBOL using
the CMPR2 option?
No, CMPR2 is not available with Enterprise COBOL.
For details, see “Upgrading your source to Enterprise COBOL” on page 15.
Can you compile programs written for VS COBOL II with Enterprise COBOL?
Yes. For details, see “Upgrading your source to Enterprise COBOL” on page 15.
What utilities or tools can assist in converting OS/VS COBOL or VS COBOL II source
to Enterprise COBOL source?
The following conversion tools, which you can order through IBM, can assist in converting OS/VS COBOL
and VS COBOL II source to Enterprise COBOL source:
1. The COBOL conversion aid (CCCA), which is included with the IBM Debug Tool product, assists in
converting OS/VS COBOL and VS COBOL II source to Enterprise COBOL source.
2. The COBOL Report Writer Precompiler 5798-DYR assists in converting OS/VS COBOL Report Writer
code, or allows you to continue using it with Enterprise COBOL.
3. The File Manager View Load Module can determine the language translator for each object in your
program objects. The File Manager View Load Module is included with the IBM File Manager for z/OS
product.
4. The free and open source COBOL Analyzer can provide assistance in taking an inventory of your
existing program objects by reporting the compiler, compiler release, and compiler options used.
Download the free COBOL Analyzer from http://cbttape.org/cbtdowns.htm. It is named as File # 321
COBOL Analyzer from Roland Schiradin & post processor on that web page.
5. Rational Asset Analyzer for System z, product number 5655-W57, assists in taking an inventory and
analyzing the impact that code changes make upon your enterprise assets.
For Enterprise COBOL 6 only: what should I do if the compiler gives me a message
about insufficient memory?
With Enterprise COBOL 6, if you get the message: IGYCB7145-U Insufficient memory in the
compiler to continue compilation, then you need to either increase the region size available to
your compilation job, or increase the MEMLIMIT setting for your system. If you are already using 1 GB
or more and it is still not enough, then it might be that your program is so large as to require the "above
the BAR" storage. This would mean that the system MEMLIMIT setting must be 2 GB or more. Ask your
system programmer what your MEMLIMIT setting is. For very large programs, MEMLIMIT might need to be
set to 3 GB or 4 GB or more.
248 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Does Enterprise COBOL meet the 2002 COBOL Standard and 2014 COBOL Standard?
Enterprise COBOL supports many parts of the 2002 COBOL Standard and 2014 COBOL Standard. For
details, see 2002/2014 COBOL Standard features implemented in Enterprise COBOL 3 or later versions in
the Enterprise COBOL for z/OS Language Reference.
How can we compile the programs with parameters to get it executed above the 2
GB bar?
There is no support in z/OS for high-level languages to run above the bar (RMODE 64), but Enterprise
COBOL 6.4 has an LP(64) compiler option that enables programs to address the data above the bar
(AMODE 64). Learn more about LP in the Enterprise COBOL for z/OS Programming Guide.
What is the difference between an object module, a load module, and a program
object?
An object module is the output of the compiler and input to the binder. A load module is a non-GOFF
executable that is output from the binder with an Enterprise COBOL 4 or earlier object module. A program
object is a new style GOFF executable that is the output from the binder when binding an object module
from Enterprise COBOL 5.1 or later versions, or the output from the binder anytime the target data set
(SYSLMOD) is a PDSE.
Are PDS and PDSE data sets allowed for object modules with Enterprise COBOL 5 or
6?
Compiler output data sets can be PDS or PDSE, including the object module. The output of the bind step
must be a PDSE. When COBOL object modules are bound (link-edited), they become program objects and
must be stored in PDSE data sets.
Are there changes in compiler generated symbols between Enterprise COBOL 4 and
5 or 6?
If you use binder statements such as CHANGE to inspect or modify a 4 compiler generated symbol,
you should use the AMBLIST utility to understand the symbols generated in COBOL 5 and 6 GOFF
executables. For details, see AMBLST in the MVS Program Management: User's Guide and Reference.
The 5 and 6 compilers typically generate new CSECTs such as C_WSA and C_CODE. They also typically
generate three related label symbols for each program, for example, Program P will result in label
symbols P, P#C, and P#S. If you use a binder statement to modify any one of these symbols, you will need
to modify all of them by using similar statements.
Will lower HEAP storage values for COBOL performance affect the performance of C
or C++ programs?
Yes. If the C programs use a lot of MALLOC statements, then C performance will be worse with lower
HEAP storage values.
Will lower HEAP storage values for COBOL performance affect PL/I performance?
In general, the answer is no. However, performance might be slower for applications that have a
high use of ALLOCATE and FREE. In this case, tune the HEAP values to improve performance. Also,
if the application has many automatic variables, the STACK values should also be tuned to improve
performance.
What do HEAP(KEEP) or LIBSTACK(KEEP) do? Does the KEEP suboption keep all of
the HEAP or LIBSTACK storage or just the increments of extra storage that were
obtained?
The KEEP suboption causes Language Environment to keep all of the storage obtained, including the
initial and incremental amounts.
250 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
How does ERRCOUNT relate to abends? Does ERRCOUNT only count HANDLED
conditions?
ERRCOUNT is a count of errors, conditions, abends, and exceptions that are allowed before Language
Environment abends with its own abend code. If an error is not HANDLED, the application will terminate
so ERRCOUNT will have no effect.
Subsystems
This topic describes frequently asked questions about subsystems and their answers.
• “When running in a CICS region, does EXEC DLI "translate" into interfacing with CEETDLI or CBLTDLI?”
on page 251
• “Is CALL 'CEETDLI' supported in a CICS program? What about CALL 'CBLTDLI' in a CICS program
running under Language Environment?” on page 251
• “If you have a batch or IMS DC application that has explicit calls to other Language Environment
services, or user-coded Language Environment condition handlers, must all IMS interfaces use CEETDLI
instead of CBLTDLI?” on page 251
• “Will Language Environment (and its support of mixed COBOL and PL/I programs) still support
applications with PL/I and VS COBOL II (or IBM COBOL) where the COBOL programs use CBLTDLI,
or must such programs be converted to CEETDLI?” on page 251
• “Do I need to specify the TRAP(OFF) runtime option when using the CBLTDLI interface under IMS?” on
page 252
• “Will assembler programs continue to work fine with Enterprise COBOL 6 programs?” on page 252
• “Is Enterprise COBOL 6 less compatible with non-LE-conforming assembler than Enterprise COBOL 4?”
on page 252
When running in a CICS region, does EXEC DLI "translate" into interfacing with
CEETDLI or CBLTDLI?
EXEC DLI does not "translate" into interfacing with either CEETDLI or CBLIDLI. The CICS translator
generates a call to DFHELI. The call to DFHELI must be a static call. (The NODYNAM compiler option is
required for programs translated by the CICS translator.)
If you have a batch or IMS DC application that has explicit calls to other Language
Environment services, or user-coded Language Environment condition handlers,
must all IMS interfaces use CEETDLI instead of CBLTDLI?
No, all calls within a program or run unit are not required to be CEETDLI. The exception is if you have any
current application using the AIBTDLI interface. AIBTDLI should be changed to CEETDLI as it improves
ESTAE processing and does not require a logic change, only a change to the call from AIBTDLI to CEETDLI.
Will Language Environment (and its support of mixed COBOL and PL/I programs)
still support applications with PL/I and VS COBOL II (or IBM COBOL) where the
COBOL programs use CBLTDLI, or must such programs be converted to CEETDLI?
There is no problem with a mixed environment from an IMS standpoint and the programs do not need to
be modified. Consider CBLTDLI and CEETDLI equivalent for conversion purposes.
Do I need to specify the TRAP(OFF) runtime option when using the CBLTDLI
interface under IMS?
No, TRAP(OFF) is not supported for COBOL programs. There are some instances when you cannot
use Language Environment condition handling when using CBLTDLI under IMS. However, if you specify
ABTERMENC(ABEND), database rollback will be performed automatically for severe-error conditions. For
details, see the Language Environment Programming Guide.
Will assembler programs continue to work fine with Enterprise COBOL 6 programs?
It depends on what your assembler programs do. If your assembler programs look into COBOL
executables for information (depending on the COBOL program layout), or if your assembler programs
are not LE-enabled (running well with LE), then problems may occur. Otherwise, assembler programs
that currently interoperate with Enterprise COBOL 4 and earlier programs will continue to work fine with
Enterprise COBOL 6 programs.
z/OS
Does COBOL run in 64-bit z/OS?
Yes. COBOL now supports AMODE 64 addressing in COBOL programs, and you can fully exploit AMODE
64 capabilities in COBOL programs. Even in AMODE 31, you can get some of the benefits of AMODE 64
z/OS just by moving to it. With an AMODE 64 addressable real memory backing your virtual memory, there
will be less paging and swapping and therefore better system performance, and you don't have to change
your programs at all! In addition, Db2 can exploit AMODE 64 addressing for SQL statements in COBOL
programs without any change to the COBOL programs.
Even when your z/OS system is running in 64-bit mode, you can still run existing AMODE 24 and AMODE
31 applications without having to relink or recompile them. You can get improved system performance
without any changes to your applications.
Performance
This topic describes frequently asked questions about performance and their answers.
• “Is there a performance improvement when one converts from OS/VS COBOL to Enterprise COBOL?” on
page 253
• “How do I know the performance gains after recompiling with Enterprise COBOL 6?” on page 253
• “What is the best way to measure the performance of a COBOL program before and after the
migration?” on page 253
252 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Is there a performance improvement when one converts from OS/VS COBOL to
Enterprise COBOL?
Yes. Enterprise COBOL 5 and 6 can give you a significant performance improvement when compared to all
older COBOL compilers. It is especially true for programs with a lot of arithmetic.
For details about the key performance benefits and tuning considerations when using Enterprise COBOL,
see the Enterprise COBOL for z/OS Performance Tuning Guide.
How do I know the performance gains after recompiling with Enterprise COBOL 6?
The only way to know the performance gains is to measure the performance before and after the
migration. So if you want to find out what your performance improvement is, it is recommended that
you back up your current Enterprise COBOL 4 modules before migrating your build compiler. When the
migration, required recompilation, or optimization by IBM Automatic Binary Optimizer for z/OS (ABO) is
done, set up a test environment, prepare the real representative workload, and measure the performance
between the Enterprise COBOL 4 modules that you backed up and your new COBOL 6 or ABO-optimized
modules.
What is the best way to measure the performance of a COBOL program before and
after the migration?
It depends on your application and workload:
• If it's a transactional application, you'll look at throughput for how many transactions it can process in a
given amount of time, for example, transactions per second.
• If it's a batch application, measure the CPU or elapsed time of the batch job.
To measure the performance of a COBOL program before and after the migration, use a profiling tool like
IBM Omegamon, IBM Application Performance Analyzer for z/OS, and other tools from IBM and other
vendors. You could also use IBM RMF to measure job resource usage through the use of SMF records.
For details on how to use RMF and other tools, see the white paper: COBOL Applications: Techniques to
make them more Efficient. In performance tuning, you should find the hotspot and the particular modules
that take the most amount of CPU time. It's not best practice to compare COBOL 4 performance before
migration with COBOL 6 performance after migration because hardware, workloads, and code may all be
changed during the migration. The comparison should be made on the same machine at the same time of
day with the same data as input.
Service
Do I need to recompile all of my programs to get IBM service support for my
applications?
If your programs are running with a supported run time, you do not need to recompile your programs to
continue to have IBM service support. For additional details, see “Service support for OS/VS COBOL and
VS COBOL II programs” on page 20.
254 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Appendix B. COBOL reserved word comparison
The following table shows differences in reserved words between OS/VS COBOL, VS COBOL II, IBM
COBOL, and Enterprise COBOL.
Information about source language comparison can be found in:
• Chapter 6, “Upgrading OS/VS COBOL source programs,” on page 45
• Chapter 8, “Upgrading VS COBOL II source programs,” on page 89
• Chapter 10, “Upgrading IBM COBOL source programs,” on page 99
• Chapter 12, “Upgrading programs from Enterprise COBOL 3,” on page 143
• Chapter 14, “Upgrading from Enterprise COBOL 4,” on page 155
Key:
X
The word is reserved in the product.
-
The word is not reserved in the product. (This includes obsolete reserved words that are no longer
flagged.)
CDW
The word is an Enterprise COBOL compiler directing statement. If used as a user-defined word, it is
flagged with a severe message.
RFD
The word is reserved for future development. If used, it is flagged with an informational message.
UNS
The word is a 85 COBOL Standard reserved word for a feature not supported by this compiler. For
some of these words, the feature is supported by the Report Writer Precompiler. If used in a program,
it is recognized as a reserved word and flagged with a severe message.
Reserved only in
Enterprise
COBOL 6.1 or
later
ALPHABET X X X -
ALPHABETIC X X X X
ALPHABETIC-LOWER X X X -
ALPHABETIC-UPPER X X X -
ALPHANUMERIC X X X -
ALPHANUMERIC-EDITED X X X -
ALSO X X X X
ALTER X X X X
ALTERNATE X X X X
AND X X X X
ANY X X X -
ANYCASE RFD - - -
APPLY X X X X
ARE X X X X
AREA X X X X
AREAS X X X X
ASCENDING X X X X
ASSIGN X X X X
AT X X X X
AUTHOR X X X X
AUTOMATIC RFD - - -
B-AND RFD RFD RFD -
B-NOT RFD RFD RFD -
B-OR RFD RFD RFD -
B-XOR RFD - - -
BASED RFD - - -
BASIS CDW CDW CDW X
BEFORE X X X X
BEGINNING X X X X
256 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
BINARY X X X -
BINARY-CHAR RFD - - -
BINARY-DOUBLE RFD - - -
BINARY-LONG RFD - - -
BINARY-SHORT RFD - - -
BIT RFD RFD RFD -
BLANK X X X X
BLOCK X X X X
BOOLEAN RFD RFD RFD -
BOTTOM X X X X
BY X X X X
BYTE-LENGTH X - - -
Reserved only in
Enterprise
COBOL 6.3 or
later
CALL X X X X
CANCEL X X X X
CBL CDW CDW CDW X
CD UNS UNS UNS X
CF UNS UNS UNS X
CH UNS UNS UNS X
CHANGED - - - X
CHARACTER X X X X
CHARACTERS X X X X
CLASS X X X -
CLASS-ID X X - -
CLOCK-UNITS UNS UNS UNS -
CLOSE X X X X
COBOL X X X -
CODE X X X X
CODE-SET X X X X
COL RFD - - -
COLLATING X X X X
Reserved
only in
COBOL
for
OS/390
& VM 2.2
or later
COMPUTATIONAL X X X X
COMPUTATIONAL-1 X X X X
COMPUTATIONAL-2 X X X X
COMPUTATIONAL-3 X X X X
COMPUTATIONAL-4 X X X X
COMPUTATIONAL-5 X X RFD -
Reserved
only in
COBOL
for
OS/390
& VM 2.2
or later
COMPUTE X X X X
CONDITION RFD - - -
CONFIGURATION X X X X
CONSOLE - - - X
258 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
CONSTANT RFD - - -
CONTAINS X X X X
CONTENT X X X -
CONTINUE X X X -
CONTROL UNS UNS UNS X
CONTROLS UNS UNS UNS X
CONVERTING X X X -
COPY CDW CDW CDW X
CORR X X X X
CORRESPONDING X X X X
COUNT X X X X
CRT RFD - - -
CSP - - - X
CURRENCY X X X X
CURRENT-DATE - - - X
CURSOR RFD - - -
C01 - - - X
C02 - - - X
C03 - - - X
C04 - - - X
C05 - - - X
C06 - - - X
C07 - - - X
C08 - - - X
C09 - - - X
C10 - - - X
C11 - - - X
C12 - - - X
DATA X X X X
DATA-POINTER RFD - - -
DATE X X X X
DATE-COMPILED X X X X
DATE-WRITTEN X X X X
DAY X X X X
Reserved only in
Enterprise
COBOL 6.1 or
later
DELETE X X X X
DELIMITED X X X X
DELIMITER X X X X
DEPENDING X X X X
DESCENDING X X X X
DESTINATION UNS UNS UNS X
DETAIL UNS UNS UNS X
DISABLE UNS UNS UNS X
DISP - - - X
DISPLAY X X X X
DISPLAY-ST - - - X
DISPLAY-1 X X X -
DIVIDE X X X X
DIVISION X X X X
DOWN X X X X
260 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
DUPLICATES X X X X
DYNAMIC X X X X
EC RFD - - -
EGCS X X X -
EGI UNS UNS UNS X
EJECT CDW CDW CDW X
ELSE X X X X
EMI UNS UNS UNS X
ENABLE UNS UNS UNS X
END X X X X
END-ACCEPT RFD - - -
END-ADD X X X -
END-CALL X X X -
END-COMPUTE X X X -
END-DELETE X X X -
END-DISPLAY RFD - - -
END-DIVIDE X X X -
END-EVALUATE X X X -
END-EXEC X X - -
Reserved
only in
COBOL
for
OS/390
& VM 2.2
or later
END-IF X X X -
END-INVOKE X X - -
END-JSON1 X - - -
Reserved only in
Enterprise
COBOL 6.1 or
later
END-MULTIPLY X X X -
END-OF-PAGE X X X X
END-PERFORM X X X -
Reserved
only in
COBOL
for
OS/390
& VM 2.2
or later
262 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
EXECUTE X X - -
Reserved
only in
COBOL
for
OS/390
& VM 2.2
or later
EXHIBIT - - - X
EXIT X X X X
EXTEND X X X X
EXTERNAL X X X -
FACTORY X X - -
Reserved
only in
COBOL
for
OS/390
& VM 2.2
or later
FALSE X X X -
FD X X X X
FILE X X X X
FILE-CONTROL X X X X
FILE-LIMIT - - - X
FILE-LIMITS - - - X
FILLER X X X X
FINAL UNS UNS UNS X
FIRST X X X X
FLOAT-EXTENDED RFD - - -
FLOAT-LONG RFD - - -
FLOAT-SHORT RFD - - -
FOOTING X X X X
FOR X X X X
FORMAT RFD RFD RFD -
Reserved only in
Enterprise
COBOL 6.1 or
later
FROM X X X X
FUNCTION X X - -
FUNCTION-ID RFD - - -
In Enterprise
COBOL 6.3 or
earlier
X
Reserved
since
Enterprise
COBOL 6.4
FUNCTION-POINTER1 X - - -
GENERATE UNS UNS UNS X
GET RFD RFD RFD -
GIVING X X X X
GLOBAL X X X -
GO X X X X
GOBACK X X X X
GREATER X X X X
GROUP UNS UNS UNS X
GROUP-USAGE1 X - - -
HEADING UNS UNS UNS X
HIGH-VALUE X X X X
HIGH-VALUES X X X X
I-O X X X X
I-O-CONTROL X X X X
ID X X X X
IDENTIFICATION X X X X
IF X X X X
IN X X X X
INDEX X X X X
INDEXED X X X X
264 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
INDICATE UNS UNS UNS X
INHERITS X X - -
INITIAL X X X X
INITIALIZE X X X -
INITIATE UNS UNS UNS X
INPUT X X X X
INPUT-OUTPUT X X X X
INSERT CDW CDW CDW X
INSPECT X X X X
INSTALLATION X X X X
INTERFACE RFD - - -
INTERFACE-ID RFD - - -
INTO X X X X
INVALID X X X X
INVOKE X X - -
IS X X X X
JAVA X - - -
Reserved only in
Enterprise
COBOL 6.3 or
later
JNIENVPTR1 X - - -
JSON1 X - - -
Reserved only in
Enterprise
COBOL 6.1 or
later
JSON-CODE1 X - - -
Reserved only in
Enterprise
COBOL 6.1 or
later
JSON-STATUS1 X - - -
Reserved only in
Enterprise
COBOL 6.2 or
later
Reserved only in
Enterprise
COBOL 6.3 or
later
266 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
MINUS RFD - - -
MODE X X X X
MODULES X X X X
MORE-LABELS X X X X
MOVE X X X X
MULTIPLE X X X X
MULTIPLY X X X X
NAMED - - - X
NATIONAL1 X - - -
NATIONAL-EDITED1 X - - -
NATIVE X X X X
NEGATIVE X X X X
NESTED RFD - - -
NEXT X X X X
NO X X X X
NOMINAL - - - X
NOT X X X X
NOTE - - - X
NULL X X X -
NULLS X X X -
NUMBER UNS UNS UNS X
NUMERIC X X X X
NUMERIC-EDITED X X X -
OBJECT X X - -
OBJECT-COMPUTER X X X X
OBJECT-REFERENCE RFD - - -
OCCURS X X X X
OF X X X X
OFF X X X X
OMITTED X X X X
ON X X X X
OPEN X X X X
OPTIONAL X X X X
OPTIONS RFD - - -
Reserved only in
Enterprise
COBOL 6.3 or
later
POINTER-64 RFD - - -
POSITION X X X X
POSITIONING - - - X
POSITIVE X X X X
PRESENT RFD RFD RFD -
PREVIOUS RFD RFD - -
PRINT-SWITCH - - - X
268 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
PRINTING UNS UNS UNS -
PROCEDURE X X X X
PROCEDURE-POINTER X X - -
PROCEDURES X X X X
PROCEED X X X X
PROCESSING X X X X
PROGRAM X X X X
PROGRAM-ID X X X X
PROGRAM-POINTER RFD - - -
PROPERTY RFD - - -
PROTOTYPE RFD - - -
PURGE UNS UNS UNS -
QUEUE UNS UNS UNS X
QUOTE X X X X
QUOTES X X X X
RAISE RFD - - -
RAISING RFD - - -
RANDOM X X X X
RD UNS UNS UNS X
READ X X X X
READY X X X X
RECEIVE UNS UNS UNS X
RECORD X X X X
RECORD-OVERFLOW - - - X
RECORDING X X X X
RECORDS X X X X
RECURSIVE X X - -
REDEFINES X X X X
REEL X X X X
REFERENCE X X X -
REFERENCES X X X X
RELATIVE X X X X
RELEASE X X X X
RELOAD X X X X
270 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
SEEK - - - X
SEGMENT UNS UNS UNS X
SEGMENT-LIMIT X X X X
SELECT X X X X
SELECTIVE - - - X
SELF X X - -
SEND UNS UNS UNS X
SENTENCE X X X X
SEPARATE X X X X
SEQUENCE X X X X
SEQUENTIAL X X X X
SERVICE X X X X
SET X X X X
SHARING RFD - - -
SHIFT-IN X X X -
SHIFT-OUT X X X -
SIGN X X X X
SIZE X X X X
SKIP1 CDW CDW CDW X
SKIP2 CDW CDW CDW X
SKIP3 CDW CDW CDW X
SORT X X X X
SORT-CONTROL X X X -
SORT-CORE-SIZE X X X X
SORT-FILE-SIZE X X X X
SORT-MERGE X X X X
SORT-MESSAGE X X X X
SORT-MODE-SIZE X X X X
SORT-RETURN X X X X
SOURCE UNS UNS UNS X
SOURCE-COMPUTER X X X X
SOURCES RFD - - -
SPACE X X X X
SPACES X X X X
Reserved
only in
COBOL
for
OS/390
& VM 2.2
or later
STANDARD X X X X
STANDARD-1 X X X X
STANDARD-2 X X X -
START X X X X
STATUS X X X X
STOP X X X X
STRING X X X X
SUB-QUEUE-1 UNS UNS UNS X
SUB-QUEUE-2 UNS UNS UNS X
SUB-QUEUE-3 UNS UNS UNS X
SUB-SCHEMA RFD RFD RFD -
SUBTRACT X X X X
SUM UNS UNS UNS X
SUPER X X - -
SUPPRESS X X X X
SYMBOLIC X X X X
SYNC X X X X
SYNCHRONIZED X X X X
SYSIN - - - X
SYSLIST - - - X
SYSOUT - - - X
SYSPUNCH X X X X
SYSTEM-DEFAULT RFD - - -
S01 - - - X
S02 - - - X
TABLE UNS UNS UNS X
272 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
TALLY X X X X
TALLYING X X X X
TAPE X X X X
TERMINAL UNS UNS UNS X
TERMINATE UNS UNS UNS X
TEST X X X -
TEXT UNS UNS UNS X
THAN X X X X
THEN X X X X
THROUGH X X X X
THRU X X X X
TIME X X X X
TIME-OF-DAY - - - X
TIMES X X X X
TITLE CDW CDW CDW -
TO X X X X
TOP X X X X
TOTALED - - - X
TOTALING - - - X
TRACE X X X X
TRACK-AREA - - - X
TRACK-LIMIT - - - X
TRACKS - - - X
TRAILING X X X X
TRANSFORM - - - X
TRUE X X X -
TYPE X X - -
Reserved
only in
COBOL
for
OS/390
& VM 2.2
or later
TYPEDEF RFD - - -
Reserved only in
Enterprise
COBOL 6.3 or
later
VAL-STATUS RFD - - -
VALID RFD RFD RFD -
VALIDATE RFD RFD RFD -
VALIDATE-STATUS RFD - - -
VALUE X X X X
VALUES X X X X
VARYING X X X X
274 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
VOLATILE1 X - - -
Reserved only in
Enterprise
COBOL 5.2 or
later
WHEN X X X X
WHEN-COMPILED X X X X
WITH X X X X
WORDS X X X X
WORKING-STORAGE X X X X
WRITE X X X X
WRITE-ONLY X X X X
XML1 X - - -
XML-CODE1 X - - -
XML-EVENT1 X - - -
XML-INFORMATION1 X - - -
Reserved only in
Enterprise
COBOL 4.2 or
later
XML-NAMESPACE1 X - - -
Reserved only in
Enterprise
COBOL 4.1 or
later
XML-NAMESPACE-PREFIX1 X - - -
Reserved only in
Enterprise
COBOL 4.1 or
later
XML-NNAMESPACE1 X - - -
Reserved only in
Enterprise
COBOL 4.1 or
later
Reserved only in
Enterprise
COBOL 4.1 or
later
XML-NTEXT1 X - - -
XML-SCHEMA1 X - - -
Reserved only in
Enterprise
COBOL 4.2 or
later
XML-TEXT1 X - - -
ZERO X X X X
ZEROES X X X X
ZEROS X X X X
_ X - - -
Reserved only in
Enterprise
COBOL 4.2 or
later
< X X X X
<> RFD
<= X X X -
+ X X X X
* X X X X
** X X X X
- X X X X
/ X X X X
> X X X X
>= X X X -
= X X X X
*>1 X - - -
Reserved only in
Enterprise
COBOL 5.1 or
later
:: RFD - - -
276 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 50. Reserved word comparison (continued)
Enterprise IBM OS/VS
Reserved word COBOL COBOL VS COBOL II COBOL
Note:
1. This is a new reserved word that has been added since IBM COBOL.
This appendix helps you to determine which, if any, of the tools to use, and understand how to use them
and how to analyze their output to assess the extent of the remaining conversion effort.
Language differences
The following language differences exist between Enterprise COBOL and OS/VS COBOL.
• Changes to ALPHABETIC class
• B symbol in PICTURE clause
• Changes to CALL statement
• Changes to CBL compiler directing statement
• Changes to Combined abbreviated relation condition
• DIVIDE ID1 BY ID2 [GIVING ID3] ON SIZE ERROR . . .
• DIVIDE ID1 INTO ID2 [GIVING ID3] ON SIZE ERROR . . .
• EXIT PROGRAM (or STOP RUN) missing at program end
• FILE STATUS clause
• ID1 IS [NOT] ALPHABETIC
(class test on IF, PERFORM, and SEARCH)
• Changes to IF . . . OTHERWISE statement
Arithmetic statements
• Definitions of floating-point data items
• Usage of floating-point literals
• Usage of exponentiation
280 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
LANGLVL(1) statements not supported
The following OS/VS COBOL statements, applicable only to the LANGLVL(1) compiler option, are not
supported in Enterprise COBOL and are flagged when the MIGR compiler option is specified.
• COPY language—1968
• JUSTIFIED|JUST clause with VALUE
• Changes in scaling for MOVE statement and comparison
• NOT in an abbreviated combined relation condition
• PERFORM statement in independent segments
• RESERVE integer AREAS
• SELECT OPTIONAL clause—1968 standard interpretation
• SPECIAL-NAMES paragraph: use of L, /, and =
• UNSTRING with DELIMITED BY ALL
Communications
• COMMUNICATION SECTION
• ACCEPT MESSAGE
• SEND, RECEIVE, ENABLE, and DISABLE statements. (Note that RECEIVE ...MESSAGE is LANGLVL
sensitive, but is flagged only under Communications.)
Report Writer
• INITIATE, GENERATE, and TERMINATE statements
• LINE-COUNTER, PAGE-COUNTER, and PRINT-SWITCH special registers
• Alphanumeric literal IS mnemonic-name in SPECIAL NAMES
• REPORT clause of FD
• REPORT SECTION header
• USE BEFORE REPORTING declarative
The Report Writer Precompiler can convert these statements for you. See “COBOL Report Writer
Precompiler” on page 286.
ISAM
• APPLY REORG-CRITERIA (ISAM)
• APPLY CORE-INDEX (ISAM)
• I/O statements—all that reference ISAM files
• ISAM file declarations
• NOMINAL KEY clause
• Organization parameter "I"
• TRACK-AREA clause
• USING KEY clause on START statement
Other statements
• APPLY RECORD-OVERFLOW
• Assignment-name organization parameter "C" indicating ASCII
• ASSIGN . . . OR
• ASSIGN TO integer system-name
• ASSIGN . . . FOR MULTIPLE REEL/UNIT
• CLOSE . . . WITH POSITIONING/DISP
• CURRENT-DATE and TIME-OF-DAY special registers
• Debug packets
• EXAMINE statement
• EXHIBIT statement
• FILE-LIMITS
• LABEL RECORDS Clause with TOTALING/TOTALED AREA options
• NOTE statement
• ON statement
• OPEN . . . LEAVE/REREAD/DISP
• Qualified index-names
(Using this unsupported format results in a severe (RC = 12) level message.)
• READY TRACE and RESET TRACE statements
• REMARKS paragraph
• RESERVE NO/ALTERNATE AREAS
• SEARCH . . . WHEN condition using KEY item as object, not subject
• SERVICE RELOAD statement
• START . . . USING key statement
• THEN as a statement connector
• TIME-OF-DAY special register
• TRANSFORM statement
• USE AFTER STANDARD ERROR . . . GIVING
• USE BEFORE STANDARD LABEL
• USING procedure-name or file-name on CALL statement
282 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
FLAGMIG compiler option
The FLAGMIG option helps identify source statements that need to be converted to compile under
Enterprise COBOL. FLAGMIG is available in compilers prior to Enterprise COBOL that support the CMPR2
option. If you are already using Enterprise COBOL 4.2, it is recommended that you use the FLAGMIG4
option (available in Enterprise COBOL 4.2 with current service applied) to help you migrate to Enterprise
COBOL 5 or 6.
To get similar migration flagging, use “COBOL and CICS/VS Command Level Conversion Aid (CCCA)” on
page 284, this Migration Guide, or a compiler released prior to Enterprise COBOL to compile programs
that use FLAGMIG.
For details about using the FLAGMIG and CMPR2 options to aid you with migration to Enterprise COBOL,
see “Upgrading programs compiled with the CMPR2 compiler option” on page 104.
If you are already using Enterprise COBOL 4.2 and want to migrate to Enterprise COBOL 5 or 6, use the
FLAGMIG4 option to flag source code syntax-related changes required to move to Enterprise COBOL 5 or
6. For details, see “FLAGMIG4 compiler option” on page 14.
284 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
EXEC CICS READ ... SET(BLL1) ...
is replaced by:
is replaced by:
The options involved are: CSA, CWA, EIB, TCTUA, and TWA.
ADD ID1, ID2 GIVING BLL ADD ID1, ID2 GIVING LCP-WS-ADDR-COMP
SET ADDRESS OF REC TO LCP-WS-ADDR-PNTR
ADD ID, BLL1 GIVING BLL2 BLL3 SET LCP-WS-ADDR-PNTR TO ADDRESS OF REC
ADD ID, LCP-WS-ADDR-COMP GIVING
LCP-WS-ADDR-COMP
SET ADDRESS OF REC2 TO LCP-WS-ADDR-PNTR
SET ADDRESS OF REC3 TO LCP-WS-ADDR-PNTR
ADD ID1, BLL1 GIVING ID2 ID3 SET LCP-WS-ADDR-PNTR TO ADDRESS OF REC
ADD ID1, LCP-WS-ADDR-COMP GIVING ID2 ID3
286 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• Single consolidated source listing merges information from the precompiler listing and the COBOL
compiler listings
• COPY library members can contain Report Writer statements
• Supports the Enterprise COBOL nested COPY feature
• Performs a diagnostic check of the input Report Writer source statements
• Can be run in stand-alone mode to convert Report Writer statements in your COBOL programs into
non-Report Writer COBOL source statements acceptable to the Enterprise COBOL compiler
For details, see COBOL Report Writer Precompiler Programmer's Manual and COBOL Report Writer
Precompiler Installation and Operation.
Download the free COBOL Analyzer from http://cbttape.org/cbtdowns.htm. It is named as File # 321
COBOL Analyzer from Roland Schiradin & post processor on that web page.
290 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 52. Language Environment supported calls between COBOL programs and assembler programs under
non-CICS; Yes indicates that a call is supported. (continued)
Calls from Issued to
VS LanEnv1 LanEnv1 Non-
Enterpris IBM COBOL OS/VS Asm2 Asm LanEnv
Call type Program issuing e COBOL COBOL II COBOL main subrtn Asm
The failure symptoms described in these notes are as they would occur when the Language Environment
TRAP(ON) and ABTERMENC(ABEND) runtime options are in effect.
1. (LanEnv stands for Language Environment.) CEEENTRY macro with MAIN=YES creates a Language
Environment assembler main. If you specify MAIN=NO on the CEEENTRY macro, a Language Environment
assembler subroutine is created. The default is MAIN=YES.
2. (Asm stands for assembler.)
3. Invoking a Language Environment assembler main program from an established Language Environment
enclave is not recommended (unless through the use of SVC LINK). For this reason, the table entries
associated with this footnote are marked No. A nested enclave is not created and, therefore, the program
runs as a subprogram in the invoking enclave. If you follow this recommendation, you might avoid the need
for reprogramming in the future.
4. You must specify NAB=NO and MAIN=NO on the CEEENTRY macro. Otherwise, you will receive failure
symptom 0C1, 0C4, or 0C5 abend.
5. If the non-Language Environment assembler caller is running within an established Language Environment
enclave, see note 3.
6. Failure symptom of 0C1, 0C4, or 0C5 abend.
7. Except when OS/VS COBOL programs exist in another established Language Environment enclave. For
detail, see Failure symptom of: message IGZ0005S.
Table 53. Language Environment supported calls between COBOL programs and assembler programs that run under CICS;
Yes indicates that a call is supported.
Calls from Issued to
Enterprise IBM VS LanEnv1 LanEnv1 Non-LanEnv
Call type Program issuing COBOL COBOL COBOL II Asm2 main Asm subrtn Asm
Static Enterprise COBOL Yes Yes Yes No3 Yes Yes
IBM COBOL Yes Yes Yes No3 No4 Yes
VS COBOL II Yes Yes Yes No3 No4 Yes
Dynamic Enterprise COBOL Yes Yes Yes No3 Yes Yes
IBM COBOL Yes Yes Yes No3 Yes Yes
VS COBOL II Yes Yes Yes No3 Yes Yes
The failure symptoms described in these notes are as they would occur when the Language Environment TRAP(ON) and
ABTERMENC(ABEND) runtime options are in effect.
1. (LanEnv stands for Language Environment.) CEEENTRY macro with MAIN=YES creates a Language Environment
assembler main. If you specify MAIN=NO on the CEEENTRY macro, a Language Environment assembler subroutine
is created. The default is MAIN=YES.
2. (Asm stands for assembler.)
3. There is no support for Language Environment-conforming assembler main programs under CICS at a level earlier than
CICS TS 3. Failure symptom: Unpredictable. The applications might appear to run successfully.
4. Failure symptom of: ASRA abend (caused by type 1 or 5 program check).
292 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Modify the assembler driver
If the assembler driver uses either IGZERRE or ILBOSTP0, it must be modified.
Replace the OS/VS COBOL ILBOSTP0 or IGZERRE routine with the Language Environment CEEPIPI
INIT_SUB, CEEPIPI INIT_ MAIN, and CEEPIPI TERM functions. These Language Environment routines
have a convenient complementary termination function that was not available with OS/VS COBOL.
Finding the name of the program that called the current COBOL 5
or 6 program
You can find the name of the calling programs from a COBOL 5 or 6 program at run time by using the LE
service CEETBCK. For more information, see the z/OS Language Environment Vendor Interfaces.
294 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Appendix E. Option comparison
The following table describes the Enterprise COBOL 5 and 6 compiler options and installation options, and
explains how the options compare with those in OS/VS COBOL, VS COBOL II, IBM COBOL, and Enterprise
COBOL 3 and 4.
For complete descriptions of the Enterprise COBOL 5 and 6 options, see Compiler options in the Enterprise
COBOL for z/OS Programming Guide.
Key:
X
The compiler option is available.
-
The compiler option is not available.
296 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Allocates buffer storage for compiler
work data sets. Three suboptions
are available: BUFSIZE(nnnnn),
BUFSIZE - X X X X X BUFSIZE(nnnK), and BUFSIZE(4096).
BUFSIZE(4096) is the default.
BUFSIZE replaces the OS/VS COBOL
BUF option.
Enables the integrated CICS translator
CICS - - X X X X capability and specifies CICS options.
NOCICS is the default.
Produces a condensed PROCEDURE
DIVISION listing plus tables and
program statistics. NOCLIST is the
default.
CLIST X - - - - -
The VS COBOL II, IBM COBOL, and
Enterprise COBOL OFFSET option
replaces the OS/VS COBOL CLIST
option.
298 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Defines the default currency symbol.
When both the CURRENCY option and
the CURRENCY SIGN clause are used
in a program, the symbol specified
in the CURRENCY SIGN clause is
considered the currency symbol in a
CURRENCY - - X X X X PICTURE clause when that symbol is
used.
NOCURRENCY is the default and
indicates that no alternate default
currency sign is provided by the
CURRENCY option.
300 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Allows the compiler to accept user-
supplied modules. (Each string is an
optional user-supplied input string to
the exit module, and each mod names
a user-supplied exit module.)
The ADEXIT suboption is only
EXIT - X X X X X available with COBOL for MVS & VM
and later compilers.
The MSGEXIT suboption is only
available with Enterprise COBOL 4.2
and later compilers.
NOEXIT is the default.
302 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
X Controls whether to check for
uninitialized data items and issue
Available warning messages when they are
only in used without being initialized.
Enterpris
INITCHECK - - - - - e COBOL
6.1 with
service
applied,
or later
LANGUAGE(AAa...a) specifies
language in which compiler messages
are issued, where AAa...a is:
UE or UENGLISH
Uppercase English
LANGUAGE - X X X X X EN or ENGLISH
Mixed-case English
JA, JP, or JAPANESE
Japanese, using the KANJI
character set
LANGUAGE=(EN) is the default.
304 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Produces a listing of assembler
language expansion of source code.
LIST - X X X X X NOLIST is the default.
LIST replaces the OS/VS COBOL PMAP
option.
306 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Determines, together with the
NUMPROC option, valid sign
configurations for numeric items in
the NUMERIC class test. NUMCLS
has two suboptions: (PRIM/ALT).
NUMCLS - X X X X X NUMCLS(PRIM) is the default.
You can specify NUMCLS only
at installation time. For more
information, see the Enterprise COBOL
for z/OS Customization Guide.
308 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Stores object code on disk or tape for
input to linkage-editor. OBJECT is the
OBJECT - X X X X X default.
OBJECT replaces the OS/VS COBOL
LOAD option.
310 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Establishes the residency mode
for the generated object program.
Programs compiled with NORENT will
RMODE - - X X X X
have RMODE(24). Programs compiled
with RENT will have RMODE(ANY).
RMODE(AUTO) is the default.
X Requests information about your
program from the compiler to improve
Available the program by flagging certain types
only in of source code at compile time.
Enterpris
RULES - - - - e COBOL X
5.1 with
service
applied,
or later
312 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
At run time, checks validity of
subscript, index, and reference
modification references.
In Enterprise COBOL 6.2, new
suboptions MSG and ABD are added
to control the runtime behavior of the
COBOL program when a range check
SSRANGE - X X X X X fails.
In Enterprise COBOL 6.1, new
suboptions ZLEN and NOZLEN are
added to control how the compiler
checks reference modification
lengths.
NOSSRANGE is the default.
314 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Truncates final intermediate results.
OS/VS COBOL has the TRUNC and
NOTRUNC options (NOTRUNC is the
default). VS COBOL II, IBM COBOL,
and Enterprise COBOL have the
TRUNC(STD|OPT|BIN) option.
TRUNC(STD)
Truncates numeric fields
according to PICTURE
specification of the binary
receiving field
TRUNC X X X X X X
TRUNC(OPT)
Truncates numeric fields in the
most optimal way
TRUNC(BIN)
Truncates binary fields based on
the storage they occupy
TRUNC(STD) is the default.
For a complete description, see
the Enterprise COBOL for z/OS
Programming Guide.
316 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Table 54. Option comparison (continued)
Option OS/ VS Enterpri Enterpri Enterpri Usage notes
VS COB IBM se se se
COB OL COBO COBOL 3 COBOL 5 COBOL 6
OL II L and 4
Specifies the first year of the 100-
year window (the century window) to
YEARWINDOW - - X X - - be applied to windowed date field
processing by the COBOL compiler.
YEARWINDOW(1900) is the default.
Tells the compiler to generate IF
X NUMERIC class tests for zoned
decimal data items that are used as
Available sending data items.
only in
In Enterprise COBOL 6.1 with
Enterpris
ZONECHECK - - - - X the service PTFs and from 6.2,
e COBOL
ZONECHECK is deprecated but is
5.1 with
tolerated for compatibility. Consider
service
using NUMCHECK(ZON) instead.
applied,
For details, see NUMCHECK in
or later
the Enterprise COBOL for z/OS
Programming Guide.
320 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Enterprise COBOL Other
5 and 6 Enterprise
COBOL IBM COBOL and OS/VS
Language element versions VS COBOL II COBOL
PICTURE symbol replication ( ), class With LP(32): 67,108,863 8,388,607 N/A
DBCS items
499,999,999
With LP(64):
1,073,741,823
LINKAGE SECTION
Total size 134,213,631- 134,217,727-B 1,048,576
With LP(32):
B
2,147,483,646 -B
With LP(64):
Unlimited, up to
the available 64-
bit addressing
capacity of the
machine.
PROCEDURE DIVISION
Procedure and constant area 4,194,3031 4,194,3031 4,194,3031 1M+32-KB
PROCEDURE DIVISION USING 32,767 32,767 32,767 N/L
identifier . . .
Procedure-names 1,048,5751 1,048,5751 1,048,5751 64-KB1
322 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Enterprise COBOL Other
5 and 6 Enterprise
COBOL IBM COBOL and OS/VS
Language element versions VS COBOL II COBOL
Statements per line (FDUMP/TEST) 7 7 7 7
Subscripted data-names per 32,767 32,767 32,767 511
statement
ADD identifier . . . N/L N/L N/L N/L
ALTER procedure-name 1 TO 4,194,3031 4,194,3031 4,194,3031 64-KB1
procedure-name 2 . . .
CALL . . . BY CONTENT identifier 2,147,483,647 2,147,483,647 2,147,483,647 N/A
CALL literal . . . 4,194,3031 4,194,3031 4,194,3031 N/L
CALL identifier or literal USING 16,380 16,380 16,380 N/L
identifier or literal . . .
Active programs in run unit 32,767 32,767 32,767 32,767
Number of names called (DYN N/L N/L N/L 64-K
option)
CANCEL identifier or literal . . . N/L N/L N/L N/L
CLOSE file-name . . . N/L N/L N/L N/L
COMPUTE identifier . . . N/L N/L N/L N/L
DISPLAY identifier or literal . . . N/L N/L N/L N/L
DIVIDE identifier . . . N/L N/L N/L N/L
ENTRY USING identifier or literal . . . N/L N/L N/L N/L
EVALUATE . . . subjects 64 64 64 N/L
EVALUATE . . . WHEN clauses 256 256 256 N/L
GO procedure-name . . . DEPENDING 255 255 255 2031
INSPECT TALLYING and REPLACING N/L N/L N/L 15
clauses
MERGE file-name ASC or DES KEY . . . N/L N/L N/L 12
Total merge key length 4092-B7 4092-B7 4092-B7 256-B
MERGE USING file-name . . . 168 168 168 168
MOVE identifier or literal TO literal . . . N/L N/L N/L N/L
MULTIPLY identifier . . . N/L N/L N/L N/L
OPEN file-name . . . N/L N/L N/L N/L
PERFORM 4,194,303 4,194,303 4,194,303 64-K
SEARCH . . . WHEN . . . N/L N/L N/L N/L
SET index or identifier . . . TO N/L N/L N/L N/L
SET index . . . UP or DOWN N/L N/L N/L N/L
SORT file-name ASC or DES KEY N/L N/L N/L 12
324 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Appendix G. Preventing file status 39 for QSAM files
To prevent file-status 39 for a QSAM file, ensure that there are no mismatches between the description of
the file in your program and the attributes defined for the data set.
The record length specified in your program must exactly match the length
Format-F files
attribute of the data set.
The maximum record length specified in your program must exactly match the
Format-U files
length attribute of the data set.
Remember: Information in the JCL overrides information in the data set label.
For details about how record lengths are determined from the FD entry and record descriptions in your
program, see the Enterprise COBOL for z/OS Programming Guide.
FILE SECTION.
FD COMMUTER-FILE-MST
RECORDING MODE IS V
RECORD IS VARYING FROM 4 TO 100 CHARACTERS.
01 COMMUTER-RECORD-A PIC X(4).
01 COMMUTER-RECORD-B PIC X(75).
Assume that the existing file in the previous example was format-U instead of format-V. If the 104 bytes
are all user data, you could define the file in your program with this code:
FILE SECTION.
FD COMMUTER-FILE-MST
RECORDING MODE IS U
RECORD IS VARYING FROM 4 TO 104 CHARACTERS.
01 COMMUTER-RECORD-A PIC X(4).
01 COMMUTER-RECORD-B PIC X(75).
JCL DD Statement:
1
//OUTFILE DD DSNAME=OUT171,UNIT=SYSDA,SPACE=(TRK,(50,5)),
// DCB=(BLKSIZE=400)
/*
ENVIRONMENT DIVISION.
INPUT─OUTPUT SECTION.
FILE─CONTROL.
SELECT CARPOOL 2
ASSIGN TO OUTFILE 1
ORGANIZATION IS SEQUENTIAL
ACCESS IS SEQUENTIAL.
.
.
.
DATA DIVISION.
FILE SECTION.
FD CARPOOL 2
LABEL RECORD STANDARD
BLOCK CONTAINS 0 CHARACTERS
RECORD CONTAINS 80 CHARACTERS
Where:
1
The ddname in the DD statement corresponds to the assignment-name in the ASSIGN clause:
//OUTFILE DD DSNAME=OUT171 …
ASSIGN TO OUTFILE
2
When you specify a file in your COBOL FILE-CONTROL entry, the file must be described in an FD entry
for file-name.
SELECT CARPOOL
FD CARPOOL
If you do need to explicitly specify a length attribute for the data set (for example, you are using an ISPF
allocation panel or if your DD statement is for a batch job in which the program uses RECORD CONTAINS
0), use the following rules:
326 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• For format-V and format-S files, specify a length attribute that is 4 bytes larger than what is defined in
the program.
• For format-F and format-U files, specify a length attribute that is the same as what is defined in the
program.
• If you open your file as OUTPUT and write it to a printer, the compiler might add one byte to the
record length to account for the carriage control character, depending on the ADV compiler option and
the COBOL language used in your program. In such a case, take the added byte into account when
specifying the LRECL.
For example, if your program contains the following code for a file with variable-length records:
FILE SECTION.
FD COMMUTER-FILE-MST
RECORDING MODE IS V
RECORD VARYING 10 TO 50 CHARACTERS.
01 COMMUTER-RECORD-A PIC X(10).
01 COMMUTER-RECORD-B PIC X(50).
RENT
If you compile with the RENT compiler option, you must tell the binder that a module is RENT with
REUS=RENT or the alternative RENT option (RENT includes REUS, so REUS is not necessary). The
attribute RENT is not set in the program object by the compiler, unlike AMODE and RMODE.
MODE AMODE(xx),RMODE(yy)
LINK(dsn-list)
AMODE(xx) RMODE(yy)
LOADGO(dsn-list) AMODE(xx) RMODE(yy)
For more information about allowable xx and yy and binder MODE control statements, see your MVS
Program Management: User's Guide and Reference.
The loader that uses information set by the binder uses a program's AMODE attribute to determine
whether a program invoked using ATTACH, LINK, XCTL, or LOAD/BASSM is to receive control in 24-bit or
31-bit addressing mode. The loader uses the RMODE attribute to determine whether a program must be
loaded into virtual storage below 16 MB, or can reside anywhere in virtual storage (above or below 16
MB).
This appendix describes conversion considerations for programs running on TSO. It includes information
about using REXX execs.
You can migrate your programs to use XMLPARSE(XMLSS) after you understand the differences between
XMLPARSE settings: XMLSS and COMPAT. Some of these differences are described in terms of new,
changed, unchanged, and discontinued events when XMLPARSE(XMLSS) is in effect.
prefix:local-part = AttValue
334 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
x'0D' CR
x'15' NL
x'25' LF
x'0D15' (these two bytes together)
x'0D25' (these two bytes together)
Some of these characters might be produced when an in-memory image of an ASCII document
is translated to EBCDIC. The COMPAT parser does none of these transforms. An application which
depends on them not being done will need appropriate changes when using XMLPARSE(XMLSS).
• DOCUMENT-TYPE-DECLARATION event (changed)
– XMLSS: XML-TEXT or XML-NTEXT contains the name of the root element, as specified in the
document type declaration. The parser processes entity declarations and default attribute values
in the internal DTD subset, and ignores the rest of the text in the document type declaration.
– COMPAT: XML-TEXT or XML-NTEXT contains the entire document type declaration.
– To migrate to XMLPARSE(XMLSS): If having the whole document type declaration is important, you
might have to modify your code that handles the DOCUMENT-TYPE-DECLARATION event to acquire
the information directly from your XML document.
• ENCODING-DECLARATION event (changed)
– XMLSS: XML-TEXT or XML-NTEXT contains the encoding name. The encoding declaration is not used
by the parser, so you might get incorrect characters passed through that would cause the parser to
signal an EXCEPTION event from which you can't recover.
– COMPAT: XML-TEXT or XML-NTEXT contains the encoding name. If there are errors in the encoding
of the document, you would get an EXCEPTION event from which you might be able to recover and
continue.
– To migrate to XMLPARSE(XMLSS): Check your document before parsing or specify your encoding
using the CODEPAGE compiler option or by using the WITH ENCODING phrase on the XML PARSE
statement.
• END-OF-CDATA-SECTION event (changed)
– XMLSS: All XML special registers except XML-EVENT, XML-CODE and XML-INFORMATION are empty
with length zero.
– COMPAT: XML-TEXT or XML-NTEXT always contains the string "]]>".
– To migrate to XMLPARSE(XMLSS): If the string "]]>" is acquired from the END-OF-CDATA-SECTION
event, change your code to manually return it using a literal, or data item initialized with the value
"]]>".
• END-OF-DOCUMENT event (no change)
– The 2 parsers have the same behavior for the END-OF-DOCUMENT event.
– To migrate to XMLPARSE(XMLSS): No change required.
• END-OF-ELEMENT event (changed)
– XMLSS: XML-TEXT or XML-NTEXT contains the local part of the end element tag or empty element
tag name. If the element name is in a namespace, XML-NAMESPACE or XML-NNAMESPACE contains
the namespace, otherwise these special registers are empty with length zero. If the element name
is in a namespace and is prefixed (of the form "prefix:local-part"), XML-NAMESPACE-PREFIX or
XML-NNAMESPACE-PREFIX contains the prefix, otherwise these special registers are empty with
length zero.
– COMPAT: XML-TEXT or XML-NTEXT contains the complete element tag name, including any prefix.
If the element name is not in a namespace, there is no difference between COMPAT and XMLSS for
END-OF-ELEMENT.
336 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
– To migrate to XMLPARSE(XMLSS): You might have to modify your code to accommodate multiple
occurrences of the PROCESSING-INSTRUCTION-TARGET event while accumulating processing
instruction data.
• STANDALONE-DECLARATION event (no change)
– XMLSS and COMPAT have the same behavior for the STANDALONE-DECLARATION event.
– To migrate to XMLPARSE(XMLSS): No change required.
• START-OF-CDATA-SECTION event (changed)
– XMLSS: All XML special registers except XML-EVENT, XML-CODE and XML-INFORMATION are empty
with length zero.
– COMPAT: XML-TEXT or XML-NTEXT always contains the string "![CDATA[".
– To migrate to XMLPARSE(XMLSS): If the string "![CDATA[" is acquired from the START-OF-CDATA-
SECTION event, change your code to manually return it using a literal, or data item initialized with the
value "![CDATA[".
• START-OF-DOCUMENT event (changed)
– XMLSS: All XML special registers except XML-EVENT, XML-CODE and XML-INFORMATION are empty
with length zero.
– COMPAT: XML-TEXT or XML-NTEXT contains the entire document.
– To migrate to XMLPARSE(XMLSS): Change your code to not require the entire document for START-
OF-DOCUMENT.
• START-OF-ELEMENT event (changed)
– XMLSS: XML-TEXT or XML-NTEXT contains the local part of the start element name or empty
element name. If the element name is in a namespace, XML-NAMESPACE or XML-NNAMESPACE
contains the namespace, otherwise these special registers are empty with length zero. If the element
name is in a namespace and is prefixed (of the form "prefix:local-part"), XML-NAMESPACE-PREFIX
or XML-NNAMESPACE-PREFIX contains the prefix, otherwise these special registers are empty with
length zero.
– COMPAT: XML-TEXT or XML-NTEXT contains the complete start element name, including any prefix.
If the element name is not in a namespace, there is no difference between COMPAT and XMLSS for
START-OF-ELEMENT.
– To migrate to XMLPARSE(XMLSS): If the element name is not in a namespace, then no change
is required. If the element name is in a namespace, change your code to not use the complete
element name, or reconstruct the complete element name from the separate parts in the XML text
and namespace special registers.
• UNKNOWN-REFERENCE-IN-ATTRIBUTE event (discontinued)
– XMLSS: Does not occur. The parser always signals an EXCEPTION event if, while processing an
attribute value, it encounters a reference to an entity that has not been defined.
– COMPAT: XML-TEXT or XML-NTEXT contains the entity reference name, not including the "&" and ";"
delimiters.
– To migrate to XMLPARSE(XMLSS): Ensure that your XML documents do not contain any undefined
entity references in attribute values.
• UNKNOWN-REFERENCE-IN-CONTENT event (discontinued)
– XMLSS: Does not occur. Instead, an UNRESOLVED-REFERENCE or EXCEPTION event occurs.
– COMPAT: XML-TEXT or XML-NTEXT contains the entity reference name, not including the "&" and ";"
delimiters.
– To migrate to XMLPARSE(XMLSS): Change your code that processes UNKNOWN-REFERENCE-IN-
CONTENT to process UNRESOLVED-REFERENCE instead.
The UNRESOLVED-REFERENCE event is signaled only if all of the following conditions are true:
- The unresolved reference is within element content, not an attribute value.
<!DOCTYPE rootElementName>
- If the VALIDATING phrase is specified on the XML PARSE statement, the document type declaration
must also specify an external DTD subset, for example:
If these conditions are not met, the parser signals an EXCEPTION event instead of UNRESOLVED-
REFERENCE.
• UNRESOLVED-REFERENCE event (new)
– XMLSS: XML-TEXT or XML-NTEXT contains the entity reference name, not including the "&" and ";"
delimiters.
– COMPAT: The event does not occur. Instead an UNKNOWN-REFERENCE-IN-CONTENT event would
occur.
– To migrate to XMLPARSE(XMLSS): See UNKNOWN-REFERENCE-IN-CONTENT.
• VERSION-INFORMATION event (no change)
– both parsers have the same behavior for the VERSION-INFORMATION event.
– To migrate to XMLPARSE(XMLSS): No change required.
More differences between XMLPARSE(XMLSS) and XMLPARSE(COMPAT):
• XML-CODE
– XMLSS: When XML-CODE is set by the parser for an EXCEPTION event, the first halfword is the
return code and the last halfword is the reason code. Convert the value to hexadecimal. You can find
common return code and reason code in the z/OS XML System Services User's Guide and Reference.
You can also find COBOL specific return code and reason code in the Enterprise COBOL for z/OS
Programming Guide
– COMPAT: XML-CODE values are described in decimal in the Enterprise COBOL for z/OS Programming
Guide.
– To migrate to XMLPARSE(XMLSS): If your program tests for specific XML-CODE values for
EXCEPTION events, you might have to change those values in your source program.
• Condition handling, RESUME, and XML PARSE statements
– XMLSS: If a condition handling routine, registered by CEEHDLR or runtime option USERHDLR, gets
control while executing a processing procedure due to an exception in the processing procedure and
the resume cursor is moved by CEEMRCE to a point in the program before an XML PARSE statement,
and RESUME is requested from the condition manager, the second XML PARSE would result in the
following severity 3 runtime error message:
– COMPAT: If a condition handling routine (registered by CEEHDLR or runtime option USERHDLR) gets
control while executing a processing procedure due to an exception in the processing procedure,
and the resume cursor is moved by CEEMRCE to a point in the program before an XML PARSE
statement, and RESUME is requested from the condition manage, the second XML PARSE would start
sucessfully.
– To migrate to XMLPARSE(XMLSS): Move the call to CEE3SRP to be within the processing procedure.
Then at the resumption point, if the condition handling routine is unable to recover from the
exception, terminate parsing by moving -1 to XML-CODE. If the condition handling routine is able to
make an effective recovery, you might be able to continue parsing by leaving XML-CODE unchanged.
338 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Alternatively, you can use CEEMRCR instead of CEEMRCE so that when execution is resumed, it is in
the program that called the program that had the XML PARSE statement that got the exception in the
processing procedure.
Either of these methods properly addresses the exception.
The following table shows the predefined entity references.
You can set SUPP_OSV OFF, ONCE, or ON, and the default value is OFF. The IGZ0268W and IGZ0269W
messages are suppressed based on the value specified:
• If OFF is specified, the IGZ0268W or IGZ0269W message is issued each time an OS/VS program is
invoked in an application and the messages are not suppressed. For example, an OS/VS program that is
invoked 5 times will issue 5 messages.
• If ONCE is specified, the IGZ0268W or IGZ0269W message is issued only once per OS/VS program,
regardless of how many times that program is invoked within the application. This option is useful in an
IMS/CICS environment where a large volume of OS/VS programs are being run.
• If ON is specified, no IGZ0268W or IGZ0269W messages will be issued, regardless of how many times
that program is invoked within the application.
IGZXOPT QSAMBUFFATL=OFF | ON
You can set QSAMBUFFATL OFF or ON, and the default value is OFF. The location of the QSAM buffers is
controlled based on the value specified:
• If OFF is specified, the QSAM buffers will be allocated according to the normal documented behavior.
• If ON is specified, the QSAM buffers will be allocated above the line for a program in Enterprise COBOL
5 or later that is compiled with options NORENT, RMODE(AUTO|24) and running in AMODE 31.
The setting of QSAMBUFFINITCHAR can be DEFAULT, SPACE, or BINZERO, and the default value is
DEFAULT. The QSAM buffer is initialized based on the value that you specify:
• If DEFAULT is specified, the QSAM buffer used for the LINAGE clause or WRITE AFTER...LINE(S)
statement is using the same behavior as in Enterprise COBOL 5.1 or earlier versions.
• If SPACE is specified, the QSAM buffer used for the LINAGE clause WRITE AFTER...LINE(S)
statement is initialized with EBCDIC SPACE (X'40').
• If BINZERO is specified, the QSAM buffer used for the LINAGE clause or WRITE AFTER...LINE(S)
statement is initialized with BINARY ZERO (X'00').
Accessibility features
z/OS includes the following major accessibility features:
• Interfaces that are commonly used by screen readers and screen-magnifier software
• Keyboard-only navigation
• Ability to customize display attributes such as color, contrast, and font size
z/OS uses the latest W3C Standard, WAI-ARIA 1.0 (http://www.w3.org/TR/wai-aria/), to ensure
compliance to US Section 508 (https://www.access-board.gov/ict/) and Web Content Accessibility
Guidelines (WCAG) 2.0 (http://www.w3.org/TR/WCAG20/). To take advantage of accessibility features,
use the latest release of your screen reader in combination with the latest web browser that is supported
by this product.
The Enterprise COBOL for z/OS online product documentation in IBM Knowledge Center is enabled for
accessibility. The accessibility features of IBM Knowledge Center are described at http://www.ibm.com/
support/knowledgecenter/en/about/releasenotes.html.
Keyboard navigation
Users can access z/OS user interfaces by using TSO/E or ISPF.
Users can also access z/OS services by using IBM Developer for z/OS.
For information about accessing these interfaces, see the following publications:
• z/OS TSO/E Primer (http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/ikj4p120)
• z/OS TSO/E User's Guide (http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/ikj4c240/
APPENDIX1.3)
• z/OS ISPF User's Guide Volume I (http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/ispzug70)
These guides describe how to use TSO/E and ISPF, including the use of keyboard shortcuts or function
keys (PF keys). Each guide includes the default settings for the PF keys and explains how to modify their
functions.
Interface information
The Enterprise COBOL for z/OS online product documentation is available in IBM Knowledge Center,
which is viewable from a standard web browser.
PDF files have limited accessibility support. With PDF documentation, you can use optional font
enlargement, high-contrast display settings, and can navigate by keyboard alone.
To enable your screen reader to accurately read syntax diagrams, source code examples, and text that
contains period or comma PICTURE symbols, you must set the screen reader to speak all punctuation.
Assistive technology products work with the user interfaces that are found in z/OS. For specific guidance
information, see the documentation for the assistive technology product that you use to access z/OS
interfaces.
In addition to standard IBM help desk and support websites, IBM has established a TTY telephone
service for use by deaf or hard of hearing customers to access sales and support services:
TTY service
800-IBM-3383 (800-426-3383)
(within North America)
348 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries.
Consult your local IBM representative for information on the products and services currently available in
your area. Any reference to an IBM product, program, or service is not intended to state or imply that
only that IBM product, program, or service may be used. Any functionally equivalent product, program, or
service that does not infringe any IBM intellectual property right may be used instead. However, it is the
user's responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this
document. The furnishing of this document does not give you any license to these patents. You can
send license inquiries, in writing, to:
For license inquiries regarding double-byte (DBCS) information, contact the IBM Intellectual Property
Department in your country or send inquiries, in writing, to:
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of
express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically
made to the information herein; these changes will be incorporated in new editions of the publication.
IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this
publication at any time without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in
any manner serve as an endorsement of those websites. The materials at those websites are not part of
the materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Licensees of this program who want to have information about it for the purpose of enabling: (i) the
exchange of information between independently created programs and other programs (including this
one) and (ii) the mutual use of the information which has been exchanged, should contact:
350 Notices
and the "IBM Software Products and Software-as-a-Service Privacy Statement" at http://www.ibm.com/
software/info/product-privacy.
Trademarks
IBM, the IBM logo, and ibm.com® are trademarks or registered trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be
trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at
“Copyright and trademark information” at www.ibm.com/legal/copytrade.shtml.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or
its affiliates.
Microsoft, Windows, and Windows NT are trademarks or registered trademarks of Microsoft Corporation.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Other company, product, and service names may be trademarks or service marks of others.
Notices 351
352 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Glossary
The terms in this glossary are defined in accordance with their meaning in COBOL. These terms might or
might not have the same meaning in other languages.
This glossary includes terms and definitions from the following publications:
• ANSI INCITS 23-1985, Programming languages - COBOL, as amended by ANSI INCITS 23a-1989,
Programming Languages - COBOL - Intrinsic Function Module for COBOL, and ANSI INCITS 23b-1993,
Programming Languages - Correction Amendment for COBOL
• ISO 1989:1985, Programming languages - COBOL, as amended by ISO/IEC 1989/AMD1:1992,
Programming languages - COBOL: Intrinsic function module and ISO/IEC 1989/AMD2:1994,
Programming languages - Correction and clarification amendment for COBOL
• ANSI X3.172-2002, American National Standard Dictionary for Information Systems
• INCITS/ISO/IEC 1989-2002, Information technology - Programming languages - COBOL
• INCITS/ISO/IEC 1989:2014, Information technology - Programming languages, their environments and
system software interfaces - Programming language COBOL
American National Standard definitions are preceded by an asterisk (*).
A
* abbreviated combined relation condition
The combined condition that results from the explicit omission of a common subject or a common
subject and common relational operator in a consecutive sequence of relation conditions.
abend
Abnormal termination of a program.
above the 2 GB bar
Storage located above the so-called 2 GB bar (or boundary). This storage is only addressable by
AMODE 64 programs.
above the 16 MB line
Storage located above the so-called 16 MB line (or boundary) but below the 2 GB bar. This storage
is not addressable by AMODE 24 programs. Before IBM introduced the MVS/XA architecture in the
1980s, the virtual storage for a program was limited to 16 MB. Programs that have been link-edited
as AMODE 24 can address only 16 MB of space, as though they were kept under an imaginary storage
line. Since VS COBOL II, a program can have AMODE 31 and can be loaded above the 16 MB line.
* access mode
The manner in which records are to be operated upon within a file.
* actual decimal point
The physical representation, using the decimal point characters period (.) or comma (,), of the decimal
point position in a data item.
actual document encoding
For an XML document, one of the following encoding categories that the XML parser determines by
examining the first few bytes of the document:
• ASCII
• EBCDIC
• UTF-8
• UTF-16, either big-endian or little-endian
• Other unsupported encoding
• No recognizable encoding
354 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Character Meaning
+ Addition
- Subtraction
* Multiplication
/ Division
** Exponentiation
* arithmetic statement
A statement that causes an arithmetic operation to be executed. The arithmetic statements are ADD,
COMPUTE, DIVIDE, MULTIPLY, and SUBTRACT.
array
An aggregate that consists of data objects, each of which can be uniquely referenced by subscripting.
An array is roughly analogous to a COBOL table.
* ascending key
A key upon the values of which data is ordered, starting with the lowest value of the key up to the
highest value of the key, in accordance with the rules for comparing data items.
ASCII
American National Standard Code for Information Interchange. The standard code uses a coded
character set that is based on 7-bit coded characters (8 bits including parity check). The standard
is used for information interchange between data processing systems, data communication systems,
and associated equipment. The ASCII set consists of control characters and graphic characters.
IBM has defined an extension to ASCII (characters 128-255).
ASCII DBCS
See double-byte ASCII.
assignment-name
A name that identifies the organization of a COBOL file and the name by which it is known to the
system.
* assumed decimal point
A decimal point position that does not involve the existence of an actual character in a data item. The
assumed decimal point has logical meaning but no physical representation.
AT END condition
A condition that is caused during the execution of a READ, RETURN, or SEARCH statement under
certain conditions:
• A READ statement runs on a sequentially accessed file when no next logical record exists in the file,
or when the number of significant digits in the relative record number is larger than the size of the
relative key data item, or when an optional input file is not available.
• A RETURN statement runs when no next logical record exists for the associated sort or merge file.
• A SEARCH statement runs when the search operation terminates without satisfying the condition
specified in any of the associated WHEN phrases.
B
basic character set
The basic set of characters used in writing words, character-strings, and separators of the language.
The basic character set is implemented in single-byte EBCDIC. The extended character set includes
DBCS characters, which can be used in comments, literals, and user-defined words.
Synonymous with COBOL character set in the 85 COBOL Standard.
batch compilation
Synonymous with sequence of programs.
Glossary 355
big-endian
The default format that the mainframe and the AIX® workstation use to store binary data and UTF-16
characters. In this format, the least significant byte of a binary data item is at the highest address and
the least significant byte of a UTF-16 character is at the highest address. Compare with little-endian.
binary item
A numeric data item that is represented in binary notation (on the base 2 numbering system). The
decimal equivalent consists of the decimal digits 0 through 9, plus an operational sign. The leftmost
bit of the item is the operational sign.
binary search
A dichotomizing search in which, at each step of the search, the set of data elements is divided by
two; some appropriate action is taken in the case of an odd number.
* block
A physical unit of data that is normally composed of one or more logical records. For mass storage
files, a block can contain a portion of a logical record. The size of a block has no direct relationship
to the size of the file within which the block is contained or to the size of the logical records that are
either contained within the block or that overlap the block. Synonymous with physical record.
boolean condition
A boolean condition determines whether a boolean literal is true or false. A boolean condition can only
be used in a constant conditional expression.
boolean literal
Can be either B'1', indicating a true value, or B'0', indicating a false value. Boolean literals can only be
used in constant conditional expressions.
breakpoint
A place in a computer program, usually specified by an instruction, where external intervention or a
monitor program can interrupt the program as it runs.
buffer
A portion of storage that is used to hold input or output data temporarily.
built-in function
See intrinsic function.
business method
A method of an enterprise bean that implements the business logic or rules of an application. (Oracle)
byte
A string that consists of a certain number of bits, usually eight, treated as a unit, and representing a
character or a control function.
byte order mark (BOM)
A Unicode character that can be used at the start of UTF-16 or UTF-32 text to indicate the byte order
of subsequent text; the byte order can be either big-endian or little-endian.
bytecode
Machine-independent code that is generated by the Java compiler and executed by the Java
interpreter. (Oracle)
C
callable services
In Language Environment, a set of services that a COBOL program can invoke by using the
conventional Language Environment-defined call interface. All programs that share the Language
Environment conventions can use these services.
called program
A program that is the object of a CALL statement. At run time the called program and calling program
are combined to produce a run unit.
* calling program
A program that executes a CALL to another program.
356 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
canonical decomposition
A way to represent a single precomposed Unicode character using two or more Unicode characters. A
canonical decomposition is typically used to separate latin letters with a diacritical mark so that the
latin letter and the diacritical mark are represented individually. See precomposed character for an
example showing a precomposed Unicode character and its canonical decomposition.
case structure
A program-processing logic in which a series of conditions is tested in order to choose between a
number of resulting actions.
cataloged procedure
A set of job control statements that are placed in a partitioned data set called the procedure library
(SYS1.PROCLIB). You can use cataloged procedures to save time and reduce errors in coding JCL.
CCSID
See coded character set identifier.
century window
A 100-year interval within which any two-digit year is unique. Several types of century window are
available to COBOL programmers:
• For the windowing intrinsic functions DATE-TO-YYYYMMDD, DAY-TO-YYYYDDD, and YEAR-TO-
YYYY, you specify the century window with argument-2.
• For Language Environment callable services, you specify the century window in CEESCEN.
* character
The basic indivisible unit of the language.
character encoding unit
A unit of data that corresponds to one code point in a coded character set. One or more character
encoding units are used to represent a character in a coded character set. Also known as encoding
unit.
For USAGE NATIONAL, a character encoding unit corresponds to one 2-byte code point of UTF-16.
For USAGE DISPLAY, a character encoding unit corresponds to a byte.
For USAGE DISPLAY-1, a character encoding unit corresponds to a 2-byte code point in the DBCS
character set.
character position
The amount of physical storage or presentation space required to hold or present one character. The
term applies to any class of character. For specific classes of characters, the following terms apply:
• Alphanumeric character position, for characters represented in USAGE DISPLAY
• DBCS character position, for DBCS characters represented in USAGE DISPLAY-1
• National character position, for characters represented in USAGE NATIONAL; synonymous with
character encoding unit for UTF-16
character set
A collection of elements that are used to represent textual information, but for which no coded
representation is assumed. See also coded character set.
character string
A sequence of contiguous characters that form a COBOL word, a literal, a PICTURE character string, or
a comment-entry. A character string must be delimited by separators.
checkpoint
A point at which information about the status of a job and the system can be recorded so that the job
step can be restarted later.
* class
The entity that defines common behavior and implementation for zero, one, or more objects. The
objects that share the same implementation are considered to be objects of the same class. Classes
can be defined hierarchically, allowing one class to inherit from another.
Glossary 357
class (object-oriented)
The entity that defines common behavior and implementation for zero, one, or more objects. The
objects that share the same implementation are considered to be objects of the same class.
* class condition
The proposition (for which a truth value can be determined) that the content of an item is wholly
alphabetic, is wholly numeric, is wholly DBCS, is wholly Kanji, or consists exclusively of the characters
that are listed in the definition of a class-name.
* class definition
The COBOL source unit that defines a class.
class hierarchy
A tree-like structure that shows relationships among object classes. It places one class at the top and
one or more layers of classes below it. Synonymous with inheritance hierarchy.
* class identification entry
An entry in the CLASS-ID paragraph of the IDENTIFICATION DIVISION; this entry contains
clauses that specify the class-name and assign selected attributes to the class definition.
class-name (object-oriented)
The name of an object-oriented COBOL class definition.
* class-name (of data)
A user-defined word that is defined in the SPECIAL-NAMES paragraph of the ENVIRONMENT
DIVISION; this word assigns a name to the proposition (for which a truth value can be defined)
that the content of a data item consists exclusively of the characters that are listed in the definition of
the class-name.
class object
The runtime object that represents a class.
* clause
An ordered set of consecutive COBOL character strings whose purpose is to specify an attribute of an
entry.
client
In object-oriented programming, a program or method that requests services from one or more
methods in a class.
COBOL character set
The set of characters used in writing COBOL syntax. The complete COBOL character set consists of
these characters:
Character Meaning
0,1, . . . ,9 Digit
A,B, . . . ,Z Uppercase letter
a,b, . . . ,z Lowercase letter
Space
+ Plus sign
- Minus sign (hyphen)
* Asterisk
/ Slant (forward slash)
= Equal sign
$ Currency sign
, Comma
; Semicolon
. Period (decimal point, full stop)
358 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Character Meaning
" Quotation mark
' Apostrophe
( Left parenthesis
) Right parenthesis
> Greater than
< Less than
: Colon
_ Underscore
* COBOL word
See word.
code page
An assignment of graphic characters and control function meanings to all code points. For example,
one code page could assign characters and meanings to 256 code points for 8-bit code, and another
code page could assign characters and meanings to 128 code points for 7-bit code. For example, one
of the IBM code pages for English on the workstation is IBM-1252 and on the host is IBM-1047. A
coded character set.
code point
A unique bit pattern that is defined in a coded character set (code page). Graphic symbols and control
characters are assigned to code points.
coded character set
A set of unambiguous rules that establish a character set and the relationship between the characters
of the set and their coded representation. Examples of coded character sets are the character sets as
represented by ASCII or EBCDIC code pages or by the UTF-16 encoding scheme for Unicode.
coded character set identifier (CCSID)
An IBM-defined number in the range 1 to 65,535 that identifies a specific code page.
* collating sequence
The sequence in which the characters that are acceptable to a computer are ordered for purposes of
sorting, merging, comparing, and for processing indexed files sequentially.
* column
A byte position within a print line or within a reference format line. The columns are numbered from 1,
by 1, starting at the leftmost position of the line and extending to the rightmost position of the line. A
column holds one single-byte character.
* combined condition
A condition that is the result of connecting two or more conditions with the AND or the OR logical
operator. See also condition and negated combined condition.
combining characters
A Unicode character used to modify other succeeding or preceding Unicode characters. Combining
characters are typically Unicode diacritical mark used to modify latin letters. See precomposed
character for an example of combining character U+0308 (¨) used with latin letter U+0061 (a).
* comment-entry
An entry in the IDENTIFICATION DIVISION that is used for documentation and has no effect on
execution.
comment line
A source program line represented by an asterisk (*) in the indicator area of the line or by an asterisk
followed by greater-than sign (*>) as the first character string in the program text area (Area A plus
Area B), and any characters from the character set of the computer that follow in Area A and Area B of
that line. A comment line serves only for documentation. A special form of comment line represented
Glossary 359
by a slant (/) in the indicator area of the line and any characters from the character set of the
computer in Area A and Area B of that line causes page ejection before the comment is printed.
* common program
A program that, despite being directly contained within another program, can be called from any
program directly or indirectly contained in that other program.
compilation group
Synonymous with sequence of programs.
compilation variable
A symbolic name for a particular literal value or the value of a compile-time arithmetic expression as
specified by the DEFINE directive or by the DEFINE compiler option.
* compile
(1) To translate a program expressed in a high-level language into a program expressed in an
intermediate language, assembly language, or a computer language. (2) To prepare a machine-
language program from a computer program written in another programming language by making
use of the overall logic structure of the program, or generating more than one computer instruction for
each symbolic statement, or both, as well as performing the function of an assembler.
* compile time
The time at which COBOL source code is translated, by a COBOL compiler, to a COBOL object program.
compile-time arithmetic expression
A subset of arithmetic expressions that are specified in the DEFINE and EVALUATE directives or in
a constant conditional expression. The difference between compile-time arithmetic expressions and
regular arithmetic expressions is that in a compile-time arithmetic expression:
• The exponentiation operator shall not be specified.
• All operands shall be integer numeric literals or arithmetic expressions in which all operands are
integer numeric literals.
• The expression shall be specified in such a way that a division by zero does not occur.
compiler
A program that translates source code written in a higher-level language into machine-language
object code.
compiler-directing statement
A statement that causes the compiler to take a specific action during compilation. The standard
compiler-directing statements are COPY, REPLACE, and USE.
* complex condition
A condition in which one or more logical operators act upon one or more conditions. See also
condition, negated simple condition, and negated combined condition.
complex ODO
Certain forms of the OCCURS DEPENDING ON clause:
• Variably located item or group: A data item described by an OCCURS clause with the DEPENDING ON
option is followed by a nonsubordinate data item or group. The group can be an alphanumeric group
or a national group.
• Variably located table: A data item described by an OCCURS clause with the DEPENDING ON option
is followed by a nonsubordinate data item described by an OCCURS clause.
• Table with variable-length elements: A data item described by an OCCURS clause contains a
subordinate data item described by an OCCURS clause with the DEPENDING ON option.
• Index name for a table with variable-length elements.
• Element of a table with variable-length elements.
component
(1) A functional grouping of related files. (2) In object-oriented programming, a reusable object
or program that performs a specific function and is designed to work with other components and
applications. JavaBeans is Oracle's architecture for creating components.
360 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
composed form
Representation of a precomposed Unicode character through a canonical decomposition. See
precomposed character for details.
* computer-name
A system-name that identifies the computer where the program is to be compiled or run.
condition (exception)
An exception that has been enabled, or recognized, by Language Environment and thus is eligible to
activate user and language condition handlers. Any alteration to the normal programmed flow of an
application. Conditions can be detected by the hardware or the operating system and result in an
interrupt. They can also be detected by language-specific generated code or language library code.
condition (expression)
A status of data at run time for which a truth value can be determined. Where used in this information
in or in reference to "condition" (condition-1, condition-2,. . .) of a general format, the term refers
to a conditional expression that consists of either a simple condition optionally parenthesized or a
combined condition (consisting of the syntactically correct combination of simple conditions, logical
operators, and parentheses) for which a truth value can be determined. See also simple condition,
complex condition, negated simple condition, combined condition, and negated combined condition.
* conditional expression
A simple condition or a complex condition specified in an EVALUATE, IF, PERFORM, or SEARCH
statement. See also simple condition and complex condition.
* conditional phrase
A phrase that specifies the action to be taken upon determination of the truth value of a condition that
results from the execution of a conditional statement.
* conditional statement
A statement that specifies that the truth value of a condition is to be determined and that the
subsequent action of the object program depends on this truth value.
* conditional variable
A data item one or more values of which has a condition-name assigned to it.
* condition-name
A user-defined word that assigns a name to a subset of values that a conditional variable can assume;
or a user-defined word assigned to a status of an implementor-defined switch or device.
* condition-name condition
The proposition (for which a truth value can be determined) that the value of a conditional variable is a
member of the set of values attributed to a condition-name associated with the conditional variable.
* CONFIGURATION SECTION
A section of the ENVIRONMENT DIVISION that describes overall specifications of source and object
programs and class definitions.
CONSOLE
A COBOL environment-name associated with the operator console.
constant conditional expression
A subset of conditional expressions that may be used in IF directives or WHEN phrases of the
EVALUATE directives.
A constant conditional expression shall be one of the following items:
• A relation condition in which both operands are literals or arithmetic expressions that contain only
literal terms. The condition shall follow the rules for relation conditions, with the following additions:
– The operands shall be of the same category. An arithmetic expression is of the category numeric.
– If literals are specified and they are not numeric literals, the relational operator shall be “IS
EQUAL TO”, “IS NOT EQUAL TO”, “IS =”, “IS NOT =”, or “IS <>”.
See also relation condition.
• A defined condition. See also defined condition.
• A boolean condition. See also boolean condition.
Glossary 361
• A complex condition formed by combining the above forms of simple conditions into complex
conditions by using AND, OR, and NOT. Abbreviated combined relation conditions shall not be
specified. See also complex condition.
contained program
A COBOL program that is nested within another COBOL program.
* contiguous items
Items that are described by consecutive entries in the DATA DIVISION, and that bear a definite
hierarchic relationship to each other.
copybook
A file or library member that contains a sequence of code that is included in the source program at
compile time using the COPY statement. The file can be created by the user, supplied by COBOL, or
supplied by another product. Synonymous with copy file.
* counter
A data item used for storing numbers or number representations in a manner that permits these
numbers to be increased or decreased by the value of another number, or to be changed or reset to
zero or to an arbitrary positive or negative value.
cross-reference listing
The portion of the compiler listing that contains information on where files, fields, and indicators are
defined, referenced, and modified in a program.
currency-sign value
A character string that identifies the monetary units stored in a numeric-edited item. Typical examples
are $, USD, and EUR. A currency-sign value can be defined by either the CURRENCY compiler option
or the CURRENCY SIGN clause in the SPECIAL-NAMES paragraph of the ENVIRONMENT DIVISION.
If the CURRENCY SIGN clause is not specified and the NOCURRENCY compiler option is in effect, the
dollar sign ($) is used as the default currency-sign value. See also currency symbol.
currency symbol
A character used in a PICTURE clause to indicate the position of a currency sign value in a numeric-
edited item. A currency symbol can be defined by either the CURRENCY compiler option or the
CURRENCY SIGN clause in the SPECIAL-NAMES paragraph of the ENVIRONMENT DIVISION. If the
CURRENCY SIGN clause is not specified and the NOCURRENCY compiler option is in effect, the dollar
sign ($) is used as the default currency sign value and currency symbol. Multiple currency symbols
and currency sign values can be defined. See also currency sign value.
* current record
In file processing, the record that is available in the record area associated with a file.
* current volume pointer
A conceptual entity that points to the current volume of a sequential file.
D
* data clause
A clause, appearing in a data description entry in the DATA DIVISION of a COBOL program, that
provides information describing a particular attribute of a data item.
* data description entry
An entry in the DATA DIVISION of a COBOL program that is composed of a level-number followed by
a data-name, if required, and then followed by a set of data clauses, as required.
DATA DIVISION
The division of a COBOL program or method that describes the data to be processed by the program
or method: the files to be used and the records contained within them; internal WORKING-STORAGE
records that will be needed; data to be made available in more than one program in the COBOL run
unit.
* data item
A unit of data (excluding literals) defined by a COBOL program or by the rules for function evaluation.
data set
Synonym for file.
362 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
* data-name
A user-defined word that names a data item described in a data description entry. When used in the
general formats, data-name represents a word that must not be reference-modified, subscripted, or
qualified unless specifically permitted by the rules for the format.
DBCS
See double-byte character set (DBCS).
DBCS character
Any character defined in IBM's double-byte character set.
DBCS character position
See character position.
DBCS data item
A data item that is described by a PICTURE character string that contains at least one symbol G, or,
when the NSYMBOL(DBCS) compiler option is in effect, at least one symbol N. A DBCS data item has
USAGE DISPLAY-1.
* debugging line
Any line with a D in the indicator area of the line.
* debugging section
A section that contains a USE FOR DEBUGGING statement.
* declarative sentence
A compiler-directing sentence that consists of a single USE statement terminated by the separator
period.
* declaratives
A set of one or more special-purpose sections, written at the beginning of the PROCEDURE
DIVISION, the first of which is preceded by the key word DECLARATIVE and the last of which is
followed by the key words END DECLARATIVES. A declarative is composed of a section header,
followed by a USE compiler-directing sentence, followed by a set of zero, one, or more associated
paragraphs.
* de-edit
The logical removal of all editing characters from a numeric-edited data item in order to determine the
unedited numeric value of the item.
defined condition
A compile-time condition that tests whether a compilation variable is defined. Defined conditions are
specified in IF directives or WHEN phrases of the EVALUATE directives.
* delimited scope statement
Any statement that includes its explicit scope terminator.
* delimiter
A character or a sequence of contiguous characters that identify the end of a string of characters and
separate that string of characters from the following string of characters. A delimiter is not part of the
string of characters that it delimits.
dependent region
In IMS, the MVS virtual storage region that contains message-driven programs, batch programs, or
online utilities.
* descending key
A key upon the values of which data is ordered starting with the highest value of key down to the
lowest value of key, in accordance with the rules for comparing data items.
digit
Any of the numerals from 0 through 9. In COBOL, the term is not used to refer to any other symbol.
* digit position
The amount of physical storage required to store a single digit. This amount can vary depending on the
usage specified in the data description entry that defines the data item.
Glossary 363
* direct access
The facility to obtain data from storage devices or to enter data into a storage device in such a way
that the process depends only on the location of that data and not on a reference to data previously
accessed.
display floating-point data item
A data item that is described implicitly or explicitly as USAGE DISPLAY and that has a PICTURE
character string that describes an external floating-point data item.
* division
A collection of zero, one, or more sections or paragraphs, called the division body, that are formed and
combined in accordance with a specific set of rules. Each division consists of the division header and
the related division body. There are four divisions in a COBOL program: Identification, Environment,
Data, and Procedure.
* division header
A combination of words followed by a separator period that indicates the beginning of a division. The
division headers are:
IDENTIFICATION DIVISION.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
DLL
See dynamic link library (DLL).
DLL application
An application that references imported programs, functions, or variables.
DLL linkage
A CALL in a program that has been compiled with the DLL and NODYNAM options; the CALL resolves
to an exported name in a separate module, or to an INVOKE of a method that is defined in a separate
module.
do construct
In structured programming, a DO statement is used to group a number of statements in a procedure.
In COBOL, an inline PERFORM statement functions in the same way.
do-until
In structured programming, a do-until loop will be executed at least once, and until a given condition
is true. In COBOL, a TEST AFTER phrase used with the PERFORM statement functions in the same
way.
do-while
In structured programming, a do-while loop will be executed if, and while, a given condition is true. In
COBOL, a TEST BEFORE phrase used with the PERFORM statement functions in the same way.
document type declaration
An XML element that contains or points to markup declarations that provide a grammar for a class of
documents. This grammar is known as a document type definition, or DTD.
document type definition (DTD)
The grammar for a class of XML documents. See document type declaration.
double-byte ASCII
An IBM character set that includes DBCS and single-byte ASCII characters. (Also known as ASCII
DBCS.)
double-byte EBCDIC
An IBM character set that includes DBCS and single-byte EBCDIC characters. (Also known as EBCDIC
DBCS.)
double-byte character set (DBCS)
A set of characters in which each character is represented by 2 bytes. Languages such as Japanese,
Chinese, and Korean, which contain more symbols than can be represented by 256 code points,
364 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
require double-byte character sets. Because each character requires 2 bytes, entering, displaying,
and printing DBCS characters requires hardware and supporting software that are DBCS-capable.
DWARF
DWARF was developed by the UNIX International Programming Languages Special Interest Group
(SIG). It is designed to meet the symbolic, source-level debugging needs of different languages in a
unified fashion by supplying language-independent debugging information. A DWARF file contains
debugging data organized into different elements. For more information, see DWARF program
information in the DWARF/ELF Extensions Library Reference.
* dynamic access
An access mode in which specific logical records can be obtained from or placed into a mass storage
file in a nonsequential manner and obtained from a file in a sequential manner during the scope of the
same OPEN statement.
dynamic CALL
A CALL literal statement in a program that has been compiled with the DYNAM option and the NODLL
option, or a CALL identifier statement in a program that has been compiled with the NODLL option.
dynamic-length
An adjective describing an item whose logical length might change at runtime.
dynamic-length elementary item
An elementary data item whose data declaration entry contains the DYNAMIC LENGTH clause.
dynamic-length group
A group item that contains a subordinate dynamic-length elementary item.
dynamic link library (DLL)
A file that contains executable code and data that are bound to a program at load time or run time,
rather than during linking. Several applications can share the code and data in a DLL simultaneously.
Although a DLL is not part of the executable file for a program, it can be required for an executable file
to run properly.
dynamic storage area (DSA)
Dynamically acquired storage composed of a register save area and an area available for dynamic
storage allocation (such as program variables). A DSA is allocated upon invocation of a program or
function and persists for the duration of the invocation instance. DSAs are generally allocated within
stack segments managed by Language Environment.
E
* EBCDIC (Extended Binary-Coded Decimal Interchange Code)
A coded character set based on 8-bit coded characters.
EBCDIC character
Any one of the symbols included in the EBCDIC (Extended Binary-Coded-Decimal Interchange Code)
set.
EBCDIC DBCS
See double-byte EBCDIC.
edited data item
A data item that has been modified by suppressing zeros or inserting editing characters or both.
* editing character
A single character or a fixed two-character combination belonging to the following set:
Character Meaning
Space
0 Zero
+ Plus
- Minus
CR Credit
Glossary 365
Character Meaning
DB Debit
Z Zero suppress
* Check protect
$ Currency sign
, Comma (decimal point)
. Period (decimal point)
/ Slant (forward slash)
EGCS
See extended graphic character set (EGCS).
EJB
See Enterprise JavaBeans.
EJB container
A container that implements the EJB component contract of the J2EE architecture. This contract
specifies a runtime environment for enterprise beans that includes security, concurrency, life cycle
management, transaction, deployment, and other services. An EJB container is provided by an EJB or
J2EE server. (Oracle)
EJB server
Software that provides services to an EJB container. An EJB server can host one or more EJB
containers. (Oracle)
element (text element)
One logical unit of a string of text, such as the description of a single data item or verb, preceded by a
unique code identifying the element type.
* elementary item
A data item that is described as not being further logically subdivided.
encapsulation
In object-oriented programming, the technique that is used to hide the inherent details of an
object. The object provides an interface that queries and manipulates the data without exposing
its underlying structure. Synonymous with information hiding.
enclave
When running under Language Environment, an enclave is analogous to a run unit. An enclave can
create other enclaves by using LINK and by using the system() function in C.
encoding unit
See character encoding unit.
end class marker
A combination of words, followed by a separator period, that indicates the end of a COBOL class
definition. The end class marker is:
366 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
* end program marker
A combination of words, followed by a separator period, that indicates the end of a COBOL source
program. The end program marker is:
enterprise bean
A component that implements a business task and resides in an EJB container. (Oracle)
Enterprise JavaBeans
A component architecture defined by Oracle for the development and deployment of object-oriented,
distributed, enterprise-level applications.
* entry
Any descriptive set of consecutive clauses terminated by a separator period and written in the
IDENTIFICATION DIVISION, ENVIRONMENT DIVISION, or DATA DIVISION of a COBOL program.
* environment clause
A clause that appears as part of an ENVIRONMENT DIVISION entry.
ENVIRONMENT DIVISION
One of the four main component parts of a COBOL program, class definition, or method definition. The
ENVIRONMENT DIVISION describes the computers where the source program is compiled and those
where the object program is run. It provides a linkage between the logical concept of files and their
records, and the physical aspects of the devices on which files are stored.
environment-name
A name, specified by IBM, that identifies system logical units, printer and card punch control
characters, report codes, program switches or all of these. When an environment-name is associated
with a mnemonic-name in the ENVIRONMENT DIVISION, the mnemonic-name can be substituted in
any format in which such substitution is valid.
environment variable
Any of a number of variables that define some aspect of the computing environment, and are
accessible to programs that operate in that environment. Environment variables can affect the
behavior of programs that are sensitive to the environment in which they operate.
escape sequence
A sequence of characters that are used to represent certain special characters within string literals
and character literals.
Escape sequences consist of two or more characters, the first of which is the backslash (\) character,
which is called the "escape character"; the remaining characters determine the interpretation of the
escape sequence. For example, \n is an escape sequence that denotes a newline character.
Escape sequences are used in programming languages such as C, C++, Java, or Python. COBOL does
not have the concept of "escape sequence" or "escape character". To handle special characters within
COBOL literals, see Basic alphanumeric literals and DBCS literals in the Enterprise COBOL for z/OS
Language Reference.
execution time
See run time.
execution-time environment
See runtime environment.
* explicit scope terminator
A reserved word that terminates the scope of a particular PROCEDURE DIVISION statement.
exponent
A number that indicates the power to which another number (the base) is to be raised. Positive
exponents denote multiplication; negative exponents denote division; and fractional exponents
denote a root of a quantity. In COBOL, an exponential expression is indicated with the symbol **
followed by the exponent.
* expression
An arithmetic or conditional expression.
Glossary 367
* extend mode
The state of a file after execution of an OPEN statement, with the EXTEND phrase specified for that file,
and before the execution of a CLOSE statement, without the REEL or UNIT phrase for that file.
extended graphic character set (EGCS)
A graphic character set, such as a kanji character set, that requires two bytes to identify each graphic
character. It is refined and replaced by double-byte character set (DBCS).
Extensible Markup Language
See XML.
extensions
COBOL syntax and semantics supported by IBM compilers in addition to those described in the 85
COBOL Standard.
external code page
For XML documents, the value specified by the CODEPAGE compiler option.
* external data
The data that is described in a program as external data items and external file connectors.
* external data item
A data item that is described as part of an external record in one or more programs of a run unit and
that can be referenced from any program in which it is described.
* external data record
A logical record that is described in one or more programs of a run unit and whose constituent data
items can be referenced from any program in which they are described.
external decimal data item
See zoned decimal data item and national decimal data item.
* external file connector
A file connector that is accessible to one or more object programs in the run unit.
external floating-point data item
See display floating-point data item and national floating-point data item.
external program
The outermost program. A program that is not nested.
* external switch
A hardware or software device, defined and named by the implementor, which is used to indicate that
one of two alternate states exists.
F
factory data
Data that is allocated once for a class and shared by all instances of the class. Factory data is declared
in the WORKING-STORAGE SECTION of the DATA DIVISION in the FACTORY paragraph of the class
definition, and is equivalent to Java private static data.
factory method
A method that is supported by a class independently of an object instance. Factory methods are
declared in the FACTORY paragraph of the class definition, and are equivalent to Java public static
methods. They are typically used to customize the creation of objects.
* figurative constant
A compiler-generated value referenced through the use of certain reserved words.
* file
A collection of logical records.
* file attribute conflict condition
An unsuccessful attempt has been made to execute an input-output operation on a file and the file
attributes, as specified for that file in the program, do not match the fixed attributes for that file.
* file clause
A clause that appears as part of any of the following DATA DIVISION entries: file description entry
(FD entry) and sort-merge file description entry (SD entry).
368 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
* file connector
A storage area that contains information about a file and is used as the linkage between a file-name
and a physical file and between a file-name and its associated record area.
File-Control
The name of an ENVIRONMENT DIVISION paragraph in which the data files for a given source
program are declared.
file control block
Block containing the addresses of I/O routines, information about how they were opened and closed,
and a pointer to the file information block.
* file control entry
A SELECT clause and all its subordinate clauses that declare the relevant physical attributes of a file.
FILE-CONTROL paragraph
A paragraph in the ENVIRONMENT DIVISION in which the data files for a given source unit are
declared.
* file description entry
An entry in the FILE SECTION of the DATA DIVISION that is composed of the level indicator FD,
followed by a file-name, and then followed by a set of file clauses as required.
* file-name
A user-defined word that names a file connector described in a file description entry or a sort-merge
file description entry within the FILE SECTION of the DATA DIVISION.
* file organization
The permanent logical file structure established at the time that a file is created.
file position indicator
A conceptual entity that contains the value of the current key within the key of reference for an
indexed file, or the record number of the current record for a sequential file, or the relative record
number of the current record for a relative file, or indicates that no next logical record exists, or that
an optional input file is not available, or that the AT END condition already exists, or that no valid next
record has been established.
* FILE SECTION
The section of the DATA DIVISION that contains file description entries and sort-merge file
description entries together with their associated record descriptions.
file system
The collection of files that conform to a specific set of data-record and file-description protocols, and
a set of programs that manage these files.
* fixed file attributes
Information about a file that is established when a file is created and that cannot subsequently
be changed during the existence of the file. These attributes include the organization of the file
(sequential, relative, or indexed), the prime record key, the alternate record keys, the code set, the
minimum and maximum record size, the record type (fixed or variable), the collating sequence of the
keys for indexed files, the blocking factor, the padding character, and the record delimiter.
* fixed-length record
A record associated with a file whose file description or sort-merge description entry requires that all
records contain the same number of bytes.
fixed-point item
A numeric data item defined with a PICTURE clause that specifies the location of an optional sign, the
number of digits it contains, and the location of an optional decimal point. The format can be either
binary, packed decimal, or external decimal.
floating comment indicators (*>)
A floating comment indicator indicates a comment line if it is the first character string in the program-
text area (Area A plus Area B), or indicates an inline comment if it is after one or more character
strings in the program-text area.
Glossary 369
floating point
A format for representing numbers in which a real number is represented by a pair of distinct
numerals. In a floating-point representation, the real number is the product of the fixed-point part
(the first numeral) and a value obtained by raising the implicit floating-point base to a power denoted
by the exponent (the second numeral). For example, a floating-point representation of the number
0.0001234 is 0.1234 -3, where 0.1234 is the mantissa and -3 is the exponent.
floating-point data item
A numeric data item that contains a fraction and an exponent. Its value is obtained by multiplying the
fraction by the base of the numeric data item raised to the power that the exponent specifies.
* format
A specific arrangement of a set of data.
* function
A temporary data item whose value is determined at the time the function is referenced during the
execution of a statement.
* function-identifier
A syntactically correct combination of character strings and separators that references a function.
The data item represented by a function is uniquely identified by a function-name with its arguments,
if any. A function-identifier can include a reference-modifier. A function-identifier that references an
alphanumeric function can be specified anywhere in the general formats that an identifier can be
specified, subject to certain restrictions. A function-identifier that references an integer or numeric
function can be referenced anywhere in the general formats that an arithmetic expression can be
specified.
function-name
A word that names the mechanism whose invocation, along with required arguments, determines the
value of a function.
function-pointer data item
A data item in which a pointer to an entry point can be stored. A data item defined with the USAGE
IS FUNCTION-POINTER clause contains the address of a function entry point. Typically used to
communicate with C and Java programs.
G
garbage collection
The automatic freeing by the Java runtime system of the memory for objects that are no longer
referenced.
* global name
A name that is declared in only one program but that can be referenced from the program and from
any program contained within the program. Condition-names, data-names, file-names, record-names,
report-names, and some special registers can be global names.
global reference
A reference to an object that is outside the scope of a method.
group item
(1) A data item that is composed of subordinate data items. See alphanumeric group item and national
group item. (2) When not qualified explicitly or by context as a national group or an alphanumeric
group, the term refers to groups in general.
grouping separator
A character used to separate units of digits in numbers for ease of reading. The default is the
character comma.
H
header label
(1) A data-set label that precedes the data records in a unit of recording media. (2) Synonym for
beginning-of-file label.
370 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
hide (a method)
To redefine (in a subclass) a factory or static method defined with the same method-name in a parent
class. Thus, the method in the subclass hides the method in the parent class.
* high-order end
The leftmost character of a string of characters.
hiperspace
In a z/OS environment, a range of up to 2 GB of contiguous virtual storage addresses that a program
can use as a buffer.
I
IBM COBOL extension
COBOL syntax and semantics supported by IBM compilers in addition to those described in the 85
COBOL Standard.
IDENTIFICATION DIVISION
One of the four main component parts of a COBOL program, class definition, or method definition.
The IDENTIFICATION DIVISION identifies the program, class, or method. The IDENTIFICATION
DIVISION can include the following documentation: author name, installation, or date.
* identifier
A syntactically correct combination of character strings and separators that names a data item.
When referencing a data item that is not a function, an identifier consists of a data-name, together
with its qualifiers, subscripts, and reference-modifier, as required for uniqueness of reference. When
referencing a data item that is a function, a function-identifier is used.
IGZCBSN
The bootstrap routine for COBOL/370 1.1. It must be link-edited with any module that contains a
COBOL/370 1.1 program.
IGZCBSO
The bootstrap routine for COBOL for MVS & VM 1.2, COBOL for OS/390 & VM and Enterprise COBOL.
It must be link-edited with any module that contains a COBOL for MVS & VM 1.2, COBOL for OS/390 &
VM or Enterprise COBOL program.
IGZEBST
The bootstrap routine for VS COBOL II. It must be link-edited with any module that contains a VS
COBOL II program.
ILC
InterLanguage Communication. Interlanguage communication is defined as programs that call or are
called by other high-level languages. Assembler is not considered a high-level language; thus, calls to
and from assembler programs are not considered ILC.
* imperative statement
A statement that either begins with an imperative verb and specifies an unconditional action to be
taken or is a conditional statement that is delimited by its explicit scope terminator (delimited scope
statement). An imperative statement can consist of a sequence of imperative statements.
* implicit scope terminator
A separator period that terminates the scope of any preceding unterminated statement, or a phrase of
a statement that by its occurrence indicates the end of the scope of any statement contained within
the preceding phrase.
IMS
Information Management System, IBM licensed product. IMS supports hierarchical databases, data
communication, translation processing, and database backout and recovery.
* index
A computer storage area or register, the content of which represents the identification of a particular
element in a table.
* index data item
A data item in which the values associated with an index-name can be stored in a form specified by
the implementor.
Glossary 371
indexed data-name
An identifier that is composed of a data-name, followed by one or more index-names enclosed in
parentheses.
* indexed file
A file with indexed organization.
* indexed organization
The permanent logical file structure in which each record is identified by the value of one or more keys
within that record.
indexing
Synonymous with subscripting using index-names.
* index-name
A user-defined word that names an index associated with a specific table.
inheritance
A mechanism for using the implementation of a class as the basis for another class. By definition,
the inheriting class conforms to the inherited classes. Enterprise COBOL does not support multiple
inheritance; a subclass has exactly one immediate superclass.
inheritance hierarchy
See class hierarchy.
* initial program
A program that is placed into an initial state every time the program is called in a run unit.
* initial state
The state of a program when it is first called in a run unit.
inline
In a program, instructions that are executed sequentially, without branching to routines, subroutines,
or other programs.
inline comments
An inline comment is identified by a floating comment indicator (*>) preceded by one or more
character-strings in the program-text area, and can be written on any line of a compilation group.
All characters that follow the floating comment indicator up to the end of area B are comment text.
* input file
A file that is opened in the input mode.
* input mode
The state of a file after execution of an OPEN statement, with the INPUT phrase specified, for that file
and before the execution of a CLOSE statement, without the REEL or UNIT phrase for that file.
* input-output file
A file that is opened in the I-O mode.
* INPUT-OUTPUT SECTION
The section of the ENVIRONMENT DIVISION that names the files and the external media required by
an object program or method and that provides information required for transmission and handling of
data at run time.
* input-output statement
A statement that causes files to be processed by performing operations on individual records or
on the file as a unit. The input-output statements are ACCEPT (with the identifier phrase), CLOSE,
DELETE, DISPLAY, OPEN, READ, REWRITE, SET (with the TO ON or TO OFF phrase), START, and
WRITE.
* input procedure
A set of statements, to which control is given during the execution of a format 1 SORT statement, for
the purpose of controlling the release of specified records to be sorted.
instance data
Data that defines the state of an object. The instance data introduced by a class is defined in
the WORKING-STORAGE SECTION of the DATA DIVISION in the OBJECT paragraph of the class
definition. The state of an object also includes the state of the instance variables introduced by
372 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
classes that are inherited by the current class. A separate copy of the instance data is created for each
object instance.
* integer
(1) A numeric literal that does not include any digit positions to the right of the decimal point. (2) A
numeric data item defined in the DATA DIVISION that does not include any digit positions to the
right of the decimal point. (3) A numeric function whose definition provides that all digits to the right
of the decimal point are zero in the returned value for any possible evaluation of the function.
integer function
A function whose category is numeric and whose definition does not include any digit positions to the
right of the decimal point.
Interactive System Productivity Facility (ISPF)
An IBM software product that provides a menu-driven interface for the TSO or VM user. ISPF includes
library utilities, a powerful editor, and dialog management.
interlanguage communication (ILC)
The ability of routines written in different programming languages to communicate. ILC support lets
you readily build applications from component routines written in a variety of languages.
intermediate result
An intermediate field that contains the results of a succession of arithmetic operations.
* internal data
The data that is described in a program and excludes all external data items and external file
connectors. Items described in the LINKAGE SECTION of a program are treated as internal data.
* internal data item
A data item that is described in one program in a run unit. An internal data item can have a global
name.
internal decimal data item
A data item that is described as USAGE PACKED-DECIMAL or USAGE COMP-3, and that has a
PICTURE character string that defines the item as numeric (a valid combination of symbols 9, S, P, or
V). Synonymous with packed-decimal data item.
* internal file connector
A file connector that is accessible to only one object program in the run unit.
internal floating-point data item
A data item that is described as USAGE COMP-1 or USAGE COMP-2. COMP-1 defines a single-
precision floating-point data item. COMP-2 defines a double-precision floating-point data item. There
is no PICTURE clause associated with an internal floating-point data item.
* intrarecord data structure
The entire collection of groups and elementary data items from a logical record that a contiguous
subset of the data description entries defines. These data description entries include all entries
whose level-number is greater than the level-number of the first data description entry describing the
intra-record data structure.
intrinsic function
A predefined function, such as a commonly used arithmetic function, called by a built-in function
reference.
* invalid key condition
A condition, at run time, caused when a specific value of the key associated with an indexed or relative
file is determined to be not valid.
* I-O-CONTROL
The name of an ENVIRONMENT DIVISION paragraph in which object program requirements for rerun
points, sharing of same areas by several data files, and multiple file storage on a single input-output
device are specified.
* I-O-CONTROL entry
An entry in the I-O-CONTROL paragraph of the ENVIRONMENT DIVISION; this entry contains
clauses that provide information required for the transmission and handling of data on named files
during the execution of a program.
Glossary 373
* I-O mode
The state of a file after execution of an OPEN statement, with the I-O phrase specified, for that file
and before the execution of a CLOSE statement without the REEL or UNIT phase for that file.
* I-O status
A conceptual entity that contains the two-character value indicating the resulting status of an input-
output operation. This value is made available to the program through the use of the FILE STATUS
clause in the file control entry for the file.
is-a
A relationship that characterizes classes and subclasses in an inheritance hierarchy. Subclasses that
have an is-a relationship to a class inherit from that class.
ISPF
See Interactive System Productivity Facility (ISPF).
iteration structure
A program processing logic in which a series of statements is repeated while a condition is true or
until a condition is true.
J
J2EE
See Java 2 Platform, Enterprise Edition (J2EE).
Java 2 Platform, Enterprise Edition (J2EE)
An environment for developing and deploying enterprise applications, defined by Oracle. The J2EE
platform consists of a set of services, application programming interfaces (APIs), and protocols that
provide the functionality for developing multitiered, Web-based applications. (Oracle)
Java Batch Launcher and Toolkit for z/OS (JZOS)
A set of tools that helps you develop z/OS Java applications that run in a traditional batch
environment, and that access z/OS system services.
Java batch-processing program (JBP)
An IMS batch-processing program that has access to online databases and output message queues.
JBPs run online, but like programs in a batch environment, they are started with JCL or in a TSO
session.
Java batch-processing region
An IMS dependent region in which only Java batch-processing programs are scheduled.
Java Database Connectivity (JDBC)
A specification from Oracle that defines an API that enables Java programs to access databases.
Java message-processing program (JMP)
A Java application program that is driven by transactions and has access to online IMS databases and
message queues.
Java message-processing region
An IMS dependent region in which only Java message-processing programs are scheduled.
Java Native Interface (JNI)
A programming interface that lets Java code that runs inside a Java virtual machine (JVM)
interoperate with applications and libraries written in other programming languages.
Java virtual machine (JVM)
A software implementation of a central processing unit that runs compiled Java programs.
JavaBeans
A portable, platform-independent, reusable component model. (Oracle)
JBP
See Java batch-processing program (JBP).
JDBC
See Java Database Connectivity (JDBC).
JMP
See Java message-processing program (JMP).
374 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
job control language (JCL)
A control language used to identify a job to an operating system and to describe the job's
requirements.
JSON
JSON (JavaScript Object Notation) is a lightweight data-interchange format.
JVM
See Java virtual machine (JVM).
JZOS
See Java Batch Launcher and Toolkit for z/OS.
K
K
When referring to storage capacity, two to the tenth power; 1024 in decimal notation.
* key
A data item that identifies the location of a record, or a set of data items that serve to identify the
ordering of data.
* key of reference
The key, either prime or alternate, currently being used to access records within an indexed file.
* keyword
A context-sensitive word or a reserved word whose presence is required when the format in which the
word appears is used in a source unit.
kilobyte (KB)
One kilobyte equals 1024 bytes.
L
* language-name
A system-name that specifies a particular programming language.
Language Environment
Short form of z/OS Language Environment. A set of architectural constructs and interfaces that
provides a common runtime environment and runtime services for C, C++, COBOL, FORTRAN and PL/I
applications. It is required for programs compiled by Language Environment-conforming compilers
and for Java applications.
Language Environment-conforming
A characteristic of compiler products (such as Enterprise COBOL, COBOL for OS/390 & VM, COBOL
for MVS & VM, C/C++ for MVS & VM, PL/I for MVS & VM) that produce object code conforming to the
Language Environment conventions.
last-used state
A state that a program is in if its internal values remain the same as when the program was exited (the
values are not reset to their initial values).
* letter
A character belonging to one of the following two sets:
1. Uppercase letters: A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z
2. Lowercase letters: a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z
* level indicator
Two alphabetic characters that identify a specific type of file or a position in a hierarchy. The level
indicators in the DATA DIVISION are: CD, FD, and SD.
* level-number
A user-defined word (expressed as a two-digit number) that indicates the hierarchical position of
a data item or the special properties of a data description entry. Level-numbers in the range from
1 through 49 indicate the position of a data item in the hierarchical structure of a logical record.
Level-numbers in the range 1 through 9 can be written either as a single digit or as a zero followed by
a significant digit. Level-numbers 66, 77, and 88 identify special properties of a data description entry.
Glossary 375
* library-name
A user-defined word that names a COBOL library that the compiler is to use for compiling a given
source program.
* library text
A sequence of text words, comment lines, inline comments, the separator space, or the separator
pseudo-text delimiter in a COBOL library.
Lilian date
The number of days since the beginning of the Gregorian calendar. Day one is Friday, October 15,
1582. The Lilian date format is named in honor of Luigi Lilio, the creator of the Gregorian calendar.
* linage-counter
A special register whose value points to the current position within the page body.
link
(1) The combination of the link connection (the transmission medium) and two link stations, one
at each end of the link connection. A link can be shared among multiple links in a multipoint or
token-ring configuration. (2) To interconnect items of data or portions of one or more computer
programs; for example, linking object programs by a linkage-editor to produce an executable file.
LINKAGE SECTION
The section in the DATA DIVISION of the called program or invoked method that describes data
items available from the calling program or invoking method. Both the calling program or invoking
method and the called program or invoked method can refer to these data items.
linker
A term that refers to either the z/OS binder (linkage-editor).
literal
A character string whose value is specified either by the ordered set of characters comprising the
string or by the use of a figurative constant.
little-endian
The default format that Intel processors use to store binary data and UTF-16 characters. In this
format, the most significant byte of a binary data item is at the highest address and the most
significant byte of a UTF-16 character is at the highest address. Compare with big-endian.
local reference
A reference to an object that is within the scope of your method.
locale
A set of attributes for a program execution environment that indicates culturally sensitive
considerations, such as character code page, collating sequence, date and time format, monetary
value representation, numeric value representation, or language.
* LOCAL-STORAGE SECTION
The section of the DATA DIVISION that defines storage that is allocated and freed on a per-
invocation basis, depending on the value assigned in the VALUE clauses.
* logical operator
One of the reserved words AND, OR, or NOT. In the formation of a condition, either AND, or OR, or both
can be used as logical connectives. NOT can be used for logical negation.
* logical record
The most inclusive data item. The level-number for a record is 01. A record can be either an
elementary item or a group of items. Synonymous with record.
* low-order end
The rightmost character of a string of characters.
M
main program
In a hierarchy of programs and subroutines, the first program that receives control when the programs
are run within a process.
376 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
makefile
A text file that contains a list of the files for your application. The make utility uses this file to update
the target files with the latest changes.
* mass storage
A storage medium in which data can be organized and maintained in both a sequential manner and a
nonsequential manner.
* mass storage device
A device that has a large storage capacity, such as a magnetic disk.
* mass storage file
A collection of records that is stored in a mass storage medium.
* megabyte (MB)
One megabyte equals 1,048,576 bytes.
* merge file
A collection of records to be merged by a MERGE statement. The merge file is created and can be used
only by the merge function.
message-processing program (MPP)
An IMS application program that is driven by transactions and has access to online IMS databases and
message queues.
message queue
The data set on which messages are queued before being processed by an application program or
sent to a terminal.
method
Procedural code that defines an operation supported by an object and that is executed by an INVOKE
statement on that object.
* method definition
The COBOL source code that defines a method.
* method identification entry
An entry in the METHOD-ID paragraph of the IDENTIFICATION DIVISION; this entry contains a
clause that specifies the method-name.
method invocation
A communication from one object to another that requests the receiving object to execute a method.
method-name
The name of an object-oriented operation. When used to invoke the method, the name can be an
alphanumeric or national literal or a category alphanumeric or category national data item. When used
in the METHOD-ID paragraph to define the method, the name must be an alphanumeric or national
literal.
method hiding
See hide.
method overloading
See overload.
method overriding
See override.
* mnemonic-name
A user-defined word that is associated in the ENVIRONMENT DIVISION with a specified
implementor-name.
module definition file
A file that describes the code segments within a program object.
MPP
See message-processing program (MPP).
multitasking
A mode of operation that provides for the concurrent, or interleaved, execution of two or more tasks.
Glossary 377
multithreading
Concurrent operation of more than one path of execution within a computer. Synonymous with
multiprocessing.
N
name
A word (composed of not more than 30 characters) that defines a COBOL operand.
namespace
See XML namespace.
national character
(1) A UTF-16 character in a USAGE NATIONAL data item or national literal. (2) Any character
represented in UTF-16.
national character data
A general reference to data represented in UTF-16.
national character position
See character position.
national data
See national character data.
national data item
A data item of category national, national-edited, or numeric-edited of USAGE NATIONAL.
national decimal data item
An external decimal data item that is described implicitly or explicitly as USAGE NATIONAL and that
contains a valid combination of PICTURE symbols 9, S, P, and V.
national-edited data item
A data item that is described by a PICTURE character string that contains at least one instance of the
symbol N and at least one of the simple insertion symbols B, 0, or /. A national-edited data item has
USAGE NATIONAL.
national floating-point data item
An external floating-point data item that is described implicitly or explicitly as USAGE NATIONAL and
that has a PICTURE character string that describes a floating-point data item.
national group item
A group item that is explicitly or implicitly described with a GROUP-USAGE NATIONAL clause. A
national group item is processed as though it were defined as an elementary data item of category
national for operations such as INSPECT, STRING, and UNSTRING. This processing ensures correct
padding and truncation of national characters, as contrasted with defining USAGE NATIONAL data
items within an alphanumeric group item. For operations that require processing of the elementary
items within a group, such as MOVE CORRESPONDING, ADD CORRESPONDING, and INITIALIZE, a
national group is processed using group semantics.
* native character set
The implementor-defined character set associated with the computer specified in the OBJECT-
COMPUTER paragraph.
* native collating sequence
The implementor-defined collating sequence associated with the computer specified in the OBJECT-
COMPUTER paragraph.
native method
A Java method with an implementation that is written in another programming language, such as
COBOL.
* negated combined condition
The NOT logical operator immediately followed by a parenthesized combined condition. See also
condition and combined condition.
* negated simple condition
The NOT logical operator immediately followed by a simple condition. See also condition and simple
condition.
378 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
nested program
A program that is directly contained within another program.
* next executable sentence
The next sentence to which control will be transferred after execution of the current statement is
complete.
* next executable statement
The next statement to which control will be transferred after execution of the current statement is
complete.
* next record
The record that logically follows the current record of a file.
* noncontiguous items
Elementary data items in the WORKING-STORAGE SECTION and LINKAGE SECTION that bear no
hierarchic relationship to other data items.
* noncontiguous items
Elementary data items in the WORKING-STORAGE and LINKAGE SECTIONs that bear no hierarchic
relationship to other data items.
* nonnumeric item
A data item whose description permits its content to be composed of any combination of characters
taken from the computer's character set. Certain categories of nonnumeric items may be formed from
more restricted character sets.
null
A figurative constant that is used to assign, to pointer data items, the value of an address that is not
valid. NULLS can be used wherever NULL can be used.
* numeric character
A character that belongs to the following set of digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.
numeric data item
(1) A data item whose description restricts its content to a value represented by characters chosen
from the digits 0 through 9. If signed, the item can also contain a +, -, or other representation of
an operational sign. (2) A data item of category numeric, internal floating-point, or external floating-
point. A numeric data item can have USAGE DISPLAY, NATIONAL, PACKED-DECIMAL, BINARY, COMP,
COMP-1, COMP-2, COMP-3, COMP-4, or COMP-5.
numeric-edited data item
A data item that contains numeric data in a form suitable for use in printed output. The data item can
consist of external decimal digits from 0 through 9, the decimal separator, commas, the currency sign,
sign control characters, and other editing characters. A numeric-edited item can be represented in
either USAGE DISPLAY or USAGE NATIONAL.
* numeric function
A function whose class and category are numeric but that for some possible evaluation does not
satisfy the requirements of integer functions.
* numeric item
A data item whose description restricts its content to a value represented by characters chosen from
the digits from '0' through '9'; if signed, the item may also contain a '+', '-', or other representation of
an operational sign.
* numeric literal
A literal composed of one or more numeric characters that can contain a decimal point or an algebraic
sign, or both. The decimal point must not be the rightmost character. The algebraic sign, if present,
must be the leftmost character.
O
object
An entity that has state (its data values) and operations (its methods). An object is a way to
encapsulate state and behavior. Each object in the class is said to be an instance of the class.
Glossary 379
object code
Output from a compiler or assembler that is itself executable machine code or is suitable for
processing to produce executable machine code.
* OBJECT-COMPUTER
The name of an ENVIRONMENT DIVISION paragraph in which the computer environment, where the
object program is run, is described.
* object computer entry
An entry in the OBJECT-COMPUTER paragraph of the ENVIRONMENT DIVISION; this entry contains
clauses that describe the computer environment in which the object program is to be executed.
object deck
A portion of an object program suitable as input to a linkage-editor. Synonymous with object module
and text deck.
object instance
A single object, of possibly many, instantiated from the specifications in the object paragraph of a
COBOL class definition. An object instance has a copy of all the data described in its class definition
and all inherited data. The methods associated with an object instance includes the methods defined
in its class definition and all inherited methods.
An object instance can be an instance of a Java class.
object module
Synonym for object deck or text deck.
* object of entry
A set of operands and reserved words, within a DATA DIVISION entry of a COBOL program, that
immediately follows the subject of the entry.
object-oriented programming
A programming approach based on the concepts of encapsulation and inheritance. Unlike procedural
programming techniques, object-oriented programming concentrates on the data objects that
comprise the problem and how they are manipulated, not on how something is accomplished.
object program
A set or group of executable machine-language instructions and other material designed to interact
with data to provide problem solutions. In this context, an object program is generally the machine
language result of the operation of a COBOL compiler on a source program or class definition. Where
there is no danger of ambiguity, the word program can be used in place of object program.
object reference
A value that identifies an instance of a class. If the class is not specified, the object reference is
universal and can apply to instances of any class.
* object time
The time at which an object program is executed. Synonymous with run time.
* obsolete element
A COBOL language element in the 85 COBOL Standard that was deleted from the 2002 COBOL
Standard.
ODO object
In the example below, X is the object of the OCCURS DEPENDING ON clause (ODO object).
WORKING-STORAGE SECTION.
01 TABLE-1.
05 X PIC S9.
05 Y OCCURS 3 TIMES
DEPENDING ON X PIC X.
The value of the ODO object determines how many of the ODO subject appear in the table.
ODO subject
In the example above, Y is the subject of the OCCURS DEPENDING ON clause (ODO subject). The
number of Y ODO subjects that appear in the table depends on the value of X.
380 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
* open mode
The state of a file after execution of an OPEN statement for that file and before the execution of a
CLOSE statement without the REEL or UNIT phrase for that file. The particular open mode is specified
in the OPEN statement as either INPUT, OUTPUT, I-O, or EXTEND.
* operand
(1) The general definition of operand is "the component that is operated upon." (2) For the purposes
of this document, any lowercase word (or words) that appears in a statement or entry format can
be considered to be an operand and, as such, is an implied reference to the data indicated by the
operand.
operation
A service that can be requested of an object.
* operational sign
An algebraic sign that is associated with a numeric data item or a numeric literal, to indicate whether
its value is positive or negative.
optional file
A file that is declared as being not necessarily available each time the object program is run.
* optional word
A reserved word that is included in a specific format only to improve the readability of the language.
Its presence is optional to the user when the format in which the word appears is used in a source
unit.
* output file
A file that is opened in either output mode or extend mode.
* output mode
The state of a file after execution of an OPEN statement, with the OUTPUT or EXTEND phrase specified,
for that file and before the execution of a CLOSE statement without the REEL or UNIT phrase for that
file.
* output procedure
A set of statements to which control is given during execution of a format 1 SORT statement after the
sort function is completed, or during execution of a MERGE statement after the merge function reaches
a point at which it can select the next record in merged order when requested.
overflow condition
A condition that occurs when a portion of the result of an operation exceeds the capacity of the
intended unit of storage.
overload
To define a method with the same name as another method that is available in the same class, but
with a different signature. See also signature.
override
To redefine an instance method (inherited from a parent class) in a subclass.
P
package
A group of related Java classes, which can be imported individually or as a whole.
packed-decimal data item
See internal decimal data item.
padding character
An alphanumeric or national character that is used to fill the unused character positions in a physical
record.
page
A vertical division of output data that represents a physical separation of the data. The separation is
based on internal logical requirements or external characteristics of the output medium or both.
* page body
That part of the logical page in which lines can be written or spaced or both.
Glossary 381
* paragraph
In the PROCEDURE DIVISION, a paragraph-name followed by a separator period and by zero, one,
or more sentences. In the IDENTIFICATION DIVISION and ENVIRONMENT DIVISION, a paragraph
header followed by zero, one, or more entries.
* paragraph header
A reserved word, followed by the separator period, that indicates the beginning of a paragraph in the
IDENTIFICATION DIVISION and ENVIRONMENT DIVISION. The permissible paragraph headers in
the IDENTIFICATION DIVISION are:
SOURCE-COMPUTER.
OBJECT-COMPUTER.
SPECIAL-NAMES.
REPOSITORY. (Program or Class
CONFIGURATION SECTION)
FILE-CONTROL.
I-O-CONTROL.
* paragraph-name
A user-defined word that identifies and begins a paragraph in the PROCEDURE DIVISION.
parameter
(1) Data passed between a calling program and a called program. (2) A data element in the USING
phrase of a method invocation. Arguments provide additional information that the invoked method
can use to perform the requested operation.
Persistent Reusable JVM
A JVM that can be serially reused for transaction processing by resetting the JVM between
transactions. The reset phase restores the JVM to a known initialization state.
* phrase
An ordered set of one or more consecutive COBOL character strings that form a portion of a COBOL
procedural statement or of a COBOL clause.
* physical record
See block.
pointer data item
A data item in which address values can be stored. Data items are explicitly defined as pointers with
the USAGE IS POINTER clause. ADDRESS OF special registers are implicitly defined as pointer data
items. Pointer data items can be compared for equality or moved to other pointer data items.
port
(1) To modify a computer program to enable it to run on a different platform. (2) In the Internet
suite of protocols, a specific logical connector between the Transmission Control Protocol (TCP) or the
User Datagram Protocol (UDP) and a higher-level protocol or application. A port is identified by a port
number.
portability
The ability to transfer an application program from one application platform to another with relatively
few changes to the source program.
382 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
precomposed character
A single Unicode character that can be represented using two or more Unicode characters through a
canonical decomposition. A precomposed character does not have the same physical representation
as its composed character form. For example, Unicode character U+00E4 (ä) is a precomposed
character that can be represented as a combination of Unicode characters U+0061 + U+0308 (ä) -
latin small letter a + combining diaeresis. A precomposed character is typically used to represent a
latin letter with a diacritical mark or some other combining character.
preinitialization
The initialization of the COBOL runtime environment in preparation for multiple calls from programs,
especially non-COBOL programs. The environment is not terminated until an explicit termination.
* prime record key
A key whose contents uniquely identify a record within an indexed file.
* priority-number
A user-defined word that classifies sections in the PROCEDURE DIVISION for purposes of
segmentation. Segment numbers can contain only the characters 0 through 9. A segment number
can be expressed as either one or two digits.
private
As applied to factory data or instance data, accessible only by methods of the class that defines the
data.
* procedure
A paragraph or group of logically successive paragraphs, or a section or group of logically successive
sections, within the PROCEDURE DIVISION.
* procedure branching statement
A statement that causes the explicit transfer of control to a statement other than the next executable
statement in the sequence in which the statements are written in the source code. The procedure
branching statements are: ALTER, CALL, EXIT, EXIT PROGRAM, GO TO, MERGE (with the OUTPUT
PROCEDURE phrase), PERFORM and SORT (with the INPUT PROCEDURE or OUTPUT PROCEDURE
phrase), XML PARSE.
PROCEDURE DIVISION
The COBOL division that contains instructions for solving a problem.
procedure integration
One of the functions of the COBOL optimizer is to simplify calls to performed procedures or contained
programs.
PERFORM procedure integration is the process whereby a PERFORM statement is replaced by its
performed procedures. Contained program procedure integration is the process where a call to a
contained program is replaced by the program code.
* procedure-name
A user-defined word that is used to name a paragraph or section in the PROCEDURE DIVISION. It
consists of a paragraph-name (which can be qualified) or a section-name.
procedure pointer
A data item in which a pointer to an entry point can be stored. A data item defined with the USAGE IS
PROCEDURE-POINTER clause contains the address of a procedure entry point.
procedure-pointer data item
A data item in which a pointer to an entry point can be stored. A data item defined with the USAGE
IS PROCEDURE-POINTER clause contains the address of a procedure entry point. Typically used to
communicate with COBOL and Language Environment programs.
process
The course of events that occurs during the execution of all or part of a program. Multiple processes
can run concurrently, and programs that run within a process can share resources.
program
(1) A sequence of instructions suitable for processing by a computer. Processing may include the use
of a compiler to prepare the program for execution, as well as a runtime environment to execute it. (2)
Glossary 383
A logical assembly of one or more interrelated modules. Multiple copies of the same program can be
run in different processes.
program-name
In the IDENTIFICATION DIVISION and the end program marker, a user-defined word or an
alphanumeric literal that identifies a COBOL source program.
* program identification entry
In the PROGRAM-ID paragraph of the IDENTIFICATION DIVISION, an entry that contains clauses
that specify the program-name and assign selected program attributes to the program.
program-name
In the IDENTIFICATION DIVISION and the end program marker, a user-defined word or
alphanumeric literal that identifies a COBOL source program.
project
The complete set of data and actions that are required to build a target, such as a dynamic link library
(DLL) or other executable (EXE).
* pseudo-text
A sequence of text words, comment lines, inline comments, or the separator space in a source
program or COBOL library bounded by, but not including, pseudo-text delimiters.
* pseudo-text delimiter
Two contiguous equal sign characters (==) used to delimit pseudo-text.
* punctuation character
A character that belongs to the following set:
Character Meaning
, Comma
; Semicolon
: Colon
. Period (full stop)
" Quotation mark
( Left parenthesis
) Right parenthesis
Space
= Equal sign
Q
QSAM (Queued Sequential Access Method)
An extended version of the basic sequential access method (BSAM). When this method is used, a
queue is formed of input data blocks that are awaiting processing or of output data blocks that have
been processed and are awaiting transfer to auxiliary storage or to an output device.
* qualified data-name
An identifier that is composed of a data-name followed by one or more sets of either of the
connectives OF and IN followed by a data-name qualifier.
* qualifier
(1) A data-name or a name associated with a level indicator that is used in a reference either together
with another data-name (which is the name of an item that is subordinate to the qualifier) or together
with a condition-name. (2) A section-name that is used in a reference together with a paragraph-name
specified in that section. (3) A library-name that is used in a reference together with a text-name
associated with that library.
R
384 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
* random access
An access mode in which the program-specified value of a key data item identifies the logical record
that is obtained from, deleted from, or placed into a relative or indexed file.
* record
See logical record.
* record area
A storage area allocated for the purpose of processing the record described in a record description
entry in the FILE SECTION of the DATA DIVISION. In the FILE SECTION, the current number of
character positions in the record area is determined by the explicit or implicit RECORD clause.
* record description
See record description entry.
* record description entry
The total set of data description entries associated with a particular record. Synonymous with record
description.
recording mode
The format of the logical records in a file. Recording mode can be F (fixed-length), V (variable-length),
S (spanned), or U (undefined).
record key
A key whose contents identify a record within an indexed file.
* record-name
A user-defined word that names a record described in a record description entry in the DATA
DIVISION of a COBOL program.
* record number
The ordinal number of a record in the file whose organization is sequential.
recording mode
The format of the logical records in a file. Recording mode can be F (fixed length), V (variable length),
S (spanned), or U (undefined).
recursion
A program calling itself or being directly or indirectly called by one of its called programs.
recursively capable
A program is recursively capable (can be called recursively) if the RECURSIVE attribute is on the
PROGRAM-ID statement.
reel
A discrete portion of a storage medium, the dimensions of which are determined by each implementor
that contains part of a file, all of a file, or any number of files. Synonymous with unit and volume.
reentrant
The attribute of a program or routine that lets more than one user share a single copy of a program
object.
* reference format
A format that provides a standard method for describing COBOL source programs.
reference modification
A method of defining a new category alphanumeric, category DBCS, or category national data item
by specifying the leftmost character and length relative to the leftmost character position of a USAGE
DISPLAY, DISPLAY-1, or NATIONAL data item.
* reference-modifier
A syntactically correct combination of character strings and separators that defines a unique data
item. It includes a delimiting left parenthesis separator, the leftmost character position, a colon
separator, optionally a length, and a delimiting right parenthesis separator.
* relation
See relational operator or relation condition.
* relation character
A character that belongs to the following set:
Glossary 385
Character Meaning
> Greater than
< Less than
= Equal to
* relation condition
The proposition (for which a truth value can be determined) that the value of an arithmetic expression,
data item, alphanumeric literal, or index-name has a specific relationship to the value of another
arithmetic expression, data item, alphanumeric literal, or index name. See also relational operator.
* relational operator
A reserved word, a relation character, a group of consecutive reserved words, or a group of
consecutive reserved words and relation characters used in the construction of a relation condition.
The permissible operators and their meanings are:
Character Meaning
IS GREATER THAN Greater than
IS > Greater than
IS NOT GREATER THAN Not greater than
IS NOT > Not greater than
IS EQUAL TO Equal to
IS = Equal to
IS NOT EQUAL TO Not equal to
IS NOT = Not equal to
* relative file
A file with relative organization.
* relative key
A key whose contents identify a logical record in a relative file.
* relative organization
The permanent logical file structure in which each record is uniquely identified by an integer value
greater than zero, which specifies the logical ordinal position of the record in the file.
* relative record number
The ordinal number of a record in a file whose organization is relative. This number is treated as a
numeric literal that is an integer.
386 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
* reserved word
A COBOL word that is specified in the list of words that can be used in a COBOL source program, but
that must not appear in the program as a user-defined word or system-name.
* resource
A facility or service, controlled by the operating system, that an executing program can use.
* resultant identifier
A user-defined data item that is to contain the result of an arithmetic operation.
reusable environment
A reusable environment is created when you establish an assembler program as the main program by
using either the old COBOL interfaces for preinitialization (RTEREUS runtime option), or the Language
Environment interface, CEEPIPI.
routine
A set of statements in a COBOL program that causes the computer to perform an operation or series
of related operations. In Language Environment, refers to either a procedure, function, or subroutine.
* routine-name
A user-defined word that identifies a procedure written in a language other than COBOL.
* run time
The time at which an object program is executed. Synonymous with object time.
runtime environment
The environment in which a COBOL program executes.
* run unit
A stand-alone object program, or several object programs, that interact by means of COBOL CALL or
INVOKE statements and function at run time as an entity.
A run unit is also called an enclave in Language Environment terminology.
S
SBCS
See single-byte character set (SBCS).
scope terminator
A COBOL reserved word that marks the end of certain PROCEDURE DIVISION statements.It can be
either explicit (END-ADD, for example) or implicit (separator period).
* section
A set of zero, one, or more paragraphs or entities, called a section body, the first of which is preceded
by a section header. Each section consists of the section header and the related section body.
* section header
A combination of words followed by a separator period that indicates the beginning of a section in
any of these divisions: ENVIRONMENT, DATA, or PROCEDURE. In the ENVIRONMENT DIVISION and
DATA DIVISION, a section header is composed of reserved words followed by a separator period.
The permissible section headers in the ENVIRONMENT DIVISION are:
CONFIGURATION SECTION.
INPUT-OUTPUT SECTION.
FILE SECTION.
WORKING-STORAGE SECTION.
LOCAL-STORAGE SECTION.
LINKAGE SECTION.
Glossary 387
* section-name
A user-defined word that names a section in the PROCEDURE DIVISION.
segmentation
A feature of Enterprise COBOL that is based on the 85 COBOL Standard segmentation module. The
segmentation feature uses priority-numbers in section headers to assign sections to fixed segments
or independent segments. Segment classification affects whether procedures contained in a segment
receive control in initial state or last-used state.
selection structure
A program processing logic in which one or another series of statements is executed, depending on
whether a condition is true or false.
* sentence
A sequence of one or more statements, the last of which is terminated by a separator period.
* separately compiled program
A program that, together with its contained programs, is compiled separately from all other programs.
* separator
A character or two or more contiguous characters used to delimit character strings.
* separator comma
A comma (,) followed by a space used to delimit character strings.
* separator period
A period (.) followed by a space used to delimit character strings.
* separator semicolon
A semicolon (;) followed by a space used to delimit character strings.
sequence of programs
A sequence of separate COBOL programs in a single source file that can be input to the compiler.
A sequence of programs is also called a batch compilation or a compilation group.
sequence structure
A program processing logic in which a series of statements is executed in sequential order.
* sequential access
An access mode in which logical records are obtained from or placed into a file in a consecutive
predecessor-to-successor logical record sequence determined by the order of records in the file.
* sequential file
A file with sequential organization.
* sequential organization
The permanent logical file structure in which a record is identified by a predecessor-successor
relationship established when the record is placed into the file.
serial search
A search in which the members of a set are consecutively examined, beginning with the first member
and ending with the last.
session bean
In EJB, an enterprise bean that is created by a client and that usually exists only for the duration of a
single client/server session. (Oracle)
77-level-description-entry
A data description entry that describes a noncontiguous data item that has level-number 77.
* sign condition
The proposition (for which a truth value can be determined) that the algebraic value of a data item or
an arithmetic expression is either less than, greater than, or equal to zero.
signature
(1) The name of an operation and its parameters. (2) The name of a method and the number and types
of its formal parameters.
* simple condition
Any single condition chosen from this set:
388 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• Relation condition
• Class condition
• Condition-name condition
• Switch-status condition
• Sign condition
See also condition and negated simple condition.
single-byte character set (SBCS)
A set of characters in which each character is represented by a single byte. See also ASCII and
EBCDIC (Extended Binary-Coded Decimal Interchange Code).
slack bytes (within records)
Bytes inserted by the compiler between data items to ensure correct alignment of some elementary
data items. Slack bytes contain no meaningful data. The SYNCHRONIZED clause instructs the
compiler to insert slack bytes when they are needed for proper alignment.
slack bytes (between records)
Bytes inserted by the programmer between blocked logical records of a file, to ensure correct
alignment of some elementary data items. In some cases, slack bytes between records improve
performance for records processed in a buffer.
* sort file
A collection of records to be sorted by a format 1 SORT statement. The sort file is created and can be
used by the sort function only.
* sort-merge file description entry
An entry in the FILE SECTION of the DATA DIVISION that is composed of the level indicator SD,
followed by a file-name, and then followed by a set of file clauses as required.
* SOURCE-COMPUTER
The name of an ENVIRONMENT DIVISION paragraph in which the computer environment, where the
source program is compiled, is described.
* source computer entry
An entry in the SOURCE-COMPUTER paragraph of the ENVIRONMENT DIVISION; this entry contains
clauses that describe the computer environment in which the source program is to be compiled.
* source item
An identifier designated by a SOURCE clause that provides the value of a printable item.
source program
Although a source program can be represented by other forms and symbols, in this document the
term always refers to a syntactically correct set of COBOL statements. A COBOL source program
commences with the IDENTIFICATION DIVISION or a COPY statement and terminates with the end
program marker, if specified, or with the absence of additional source program lines.
source unit
A unit of COBOL source code that can be separately compiled: a program or a class definition. Also
known as a compilation unit.
special character
A character that belongs to the following set:
Character Meaning
+ Plus sign
- Minus sign (hyphen)
* Asterisk
/ Slant (forward slash)
= Equal sign
$ Currency sign
Glossary 389
Character Meaning
, Comma
; Semicolon
. Period (decimal point, full stop)
" Quotation mark
' Apostrophe
( Left parenthesis
) Right parenthesis
> Greater than
< Less than
: Colon
_ Underscore
SPECIAL-NAMES
The name of an ENVIRONMENT DIVISION paragraph in which environment-names are related to
user-specified mnemonic-names.
* special names entry
An entry in the SPECIAL-NAMES paragraph of the ENVIRONMENT DIVISION; this entry provides
means for specifying the currency sign; choosing the decimal point; specifying symbolic characters;
relating implementor-names to user-specified mnemonic-names; relating alphabet-names to
character sets or collating sequences; and relating class-names to sets of characters.
* special registers
Certain compiler-generated storage areas whose primary use is to store information produced in
conjunction with the use of a specific COBOL feature.
* standard data format
The concept used in describing the characteristics of data in a COBOL DATA DIVISION under which
the characteristics or properties of the data are expressed in a form oriented to the appearance of the
data on a printed page of infinite length and breadth, rather than a form oriented to the manner in
which the data is stored internally in the computer, or on a particular external medium.
* statement
A syntactically valid combination of words, literals, and separators, beginning with a verb, written in a
COBOL source program.
structured programming
A technique for organizing and coding a computer program in which the program comprises a
hierarchy of segments, each segment having a single entry point and a single exit point. Control
is passed downward through the structure without unconditional branches to higher levels of the
hierarchy.
* subclass
A class that inherits from another class. When two classes in an inheritance relationship are
considered together, the subclass is the inheritor or inheriting class; the superclass is the inheritee or
inherited class.
* subject of entry
An operand or reserved word that appears immediately following the level indicator or the level-
number in a DATA DIVISION entry.
* subprogram
See called program.
* subscript
An occurrence number that is represented by either an integer, a data-name optionally followed by an
integer with the operator + or -, or an index-name optionally followed by an integer with the operator
390 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
+ or -, that identifies a particular element in a table. A subscript can be the word ALL when the
subscripted identifier is used as a function argument for a function allowing a variable number of
arguments.
* subscripted data-name
An identifier that is composed of a data-name followed by one or more subscripts enclosed in
parentheses.
substitution character
A character that is used in a conversion from a source code page to a target code page to represent a
character that is not defined in the target code page.
* superclass
A class that is inherited by another class. See also subclass.
surrogate pair
In the UTF-16 format of Unicode, a pair of encoding units that together represents a single Unicode
graphic character. The first unit of the pair is called a high surrogate and the second a low surrogate.
The code value of a high surrogate is in the range X'D800' through X'DBFF'. The code value of a low
surrogate is in the range X'DC00' through X'DFFF'. Surrogate pairs provide for more characters than
the 65,536 characters that fit in the Unicode 16-bit coded character set.
switch-status condition
The proposition (for which a truth value can be determined) that an UPSI switch, capable of being set
to an on or off status, has been set to a specific status.
* symbolic-character
A user-defined word that specifies a user-defined figurative constant.
syntax
(1) The relationship among characters or groups of characters, independent of their meanings or
the manner of their interpretation and use. (2) The structure of expressions in a language. (3) The
rules governing the structure of a language. (4) The relationship among symbols. (5) The rules for the
construction of a statement.
* system-name
A COBOL word that is used to communicate with the operating environment.
T
* table
A set of logically consecutive items of data that are defined in the DATA DIVISION by means of the
OCCURS clause.
* table element
A data item that belongs to the set of repeated items comprising a table.
text deck
Synonym for object deck or object module.
* text-name
A user-defined word that identifies library text.
* text word
A character or a sequence of contiguous characters between margin A and margin R in a COBOL
library, source program, or pseudo-text that is any of the following characters:
• A separator, except for space; a pseudo-text delimiter; and the opening and closing delimiters for
alphanumeric literals. The right parenthesis and left parenthesis characters, regardless of context
within the library, source program, or pseudo-text, are always considered text words.
• A literal including, in the case of alphanumeric literals, the opening quotation mark and the closing
quotation mark that bound the literal.
• Any other sequence of contiguous COBOL characters except comment lines and the word COPY
bounded by separators that are neither a separator nor a literal.
Glossary 391
thread
A stream of computer instructions (initiated by an application within a process) that is in control of a
process.
token
In the COBOL editor, a unit of meaning in a program. A token can contain data, a language keyword, an
identifier, or other part of the language syntax.
top-down design
The design of a computer program using a hierarchic structure in which related functions are
performed at each level of the structure.
top-down development
See structured programming.
trailer-label
(1) A data-set label that follows the data records on a unit of recording medium. (2) Synonym for
end-of-file label.
troubleshoot
To detect, locate, and eliminate problems in using computer software.
* truth value
The representation of the result of the evaluation of a condition in terms of one of two values: true or
false.
typed object reference
A data-name that can refer only to an object of a specified class or any of its subclasses.
U
* unary operator
A plus (+) or a minus (-) sign that precedes a variable or a left parenthesis in an arithmetic expression
and that has the effect of multiplying the expression by +1 or -1, respectively.
unbounded table
A table with OCCURS integer-1 to UNBOUNDED instead of specifying integer-2 as the upper
bound.
Unicode
A universal character encoding standard that supports the interchange, processing, and display of text
that is written in any of the languages of the modern world. There are multiple encoding schemes to
represent Unicode, including UTF-8, UTF-16, and UTF-32. Enterprise COBOL supports Unicode using
UTF-16 in big-endian format as the representation for the national data type.
Uniform Resource Identifier (URI)
A sequence of characters that uniquely names a resource; in Enterprise COBOL, the identifier of a
namespace. URI syntax is defined by the document Uniform Resource Identifier (URI): Generic Syntax.
unit
A module of direct access, the dimensions of which are determined by IBM.
universal object reference
A data-name that can refer to an object of any class.
unrestricted storage
In AMODE 31, unrestricted storage is below the 2 GB bar and can be above or below the 16 MB line.
In AMODE 64, unrestricted storage encompasses all the storage available to your program, both
above and below the 2 GB bar.
* unsuccessful execution
The attempted execution of a statement that does not result in the execution of all the operations
specified by that statement. The unsuccessful execution of a statement does not affect any data
referenced by that statement, but can affect status indicators.
UPSI switch
A program switch that performs the functions of a hardware switch. Eight are provided: UPSI-0
through UPSI-7.
392 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
URI
See Uniform Resource Identifier (URI).
* user-defined word
A COBOL word that must be supplied by the user to satisfy the format of a clause or statement.
V
* variable
A data item whose value can be changed by execution of the object program. A variable used in an
arithmetic expression must be a numeric elementary item.
variable-length item
A group item that contains a table described with the DEPENDING phrase of the OCCURS clause.
* variable-length record
A record associated with a file whose file description or sort-merge description entry permits records
to contain a varying number of character positions.
* variable-occurrence data item
A variable-occurrence data item is a table element that is repeated a variable number of times.
Such an item must contain an OCCURS DEPENDING ON clause in its data description entry or be
subordinate to such an item.
* variably located group
A group item following, and not subordinate to, a variable-length table in the same record. The group
item can be an alphanumeric group or a national group.
* variably located item
A data item following, and not subordinate to, a variable-length table in the same record.
* verb
A word that expresses an action to be taken by a COBOL compiler or object program.
volume
A module of external storage. For tape devices it is a reel; for direct-access devices it is a unit.
volume switch procedures
System-specific procedures that are executed automatically when the end of a unit or reel has been
reached before end-of-file has been reached.
VSAM file system
A file system that supports COBOL sequential, relative, and indexed organizations.
W
web service
A modular application that performs specific tasks and is accessible through open protocols like HTTP
and SOAP.
white space
Characters that introduce space into a document. They are:
• Space
• Horizontal tabulation
• Carriage return
• Line feed
• Next line
as named in the Unicode Standard.
* word
A character string of not more than 30 characters that forms a user-defined word, a system-name, a
reserved word, or a function-name.
* WORKING-STORAGE SECTION
The section of the DATA DIVISION that describes WORKING-STORAGE data items, composed either
of noncontiguous items or WORKING-STORAGE records or of both.
Glossary 393
workstation
A generic term for computers, including personal computers, 3270 terminals, intelligent workstations,
and UNIX terminals. Often a workstation is connected to a mainframe or to a network.
wrapper
An object that provides an interface between object-oriented code and procedure-oriented code.
Using wrappers lets programs be reused and accessed by other systems.
X
x
The symbol in a PICTURE clause that can hold any character in the character set of the computer.
XML
Extensible Markup Language. A standard metalanguage for defining markup languages that was
derived from and is a subset of SGML. XML omits the more complex and less-used parts of SGML and
makes it much easier to write applications to handle document types, author and manage structured
information, and transmit and share structured information across diverse computing systems. The
use of XML does not require the robust applications and processing that is necessary for SGML. XML is
developed under the auspices of the World Wide Web Consortium (W3C).
XML data
Data that is organized into a hierarchical structure with XML elements. The data definitions are
defined in XML element type declarations.
XML declaration
XML text that specifies characteristics of the XML document such as the version of XML being used
and the encoding of the document.
XML document
A data object that is well formed as defined by the W3C XML specification.
XML namespace
A mechanism, defined by the W3C XML Namespace specifications, that limits the scope of a collection
of element names and attribute names. A uniquely chosen XML namespace ensures the unique
identity of an element name or attribute name across multiple XML documents or multiple contexts
within an XML document.
XML schema
A mechanism, defined by the W3C, for describing and constraining the structure and content of XML
documents. An XML schema, which is itself expressed in XML, effectively defines a class of XML
documents of a given type, for example, purchase orders.
Z
z/OS UNIX file system
A collection of files and directories that are organized in a hierarchical structure and can be accessed
by using z/OS UNIX.
zoned decimal data item
An external decimal data item that is described implicitly or explicitly as USAGE DISPLAY and that
contains a valid combination of PICTURE symbols 9, S, P, and V. The content of a zoned decimal data
item is represented in characters 0 through 9, optionally with a sign. If the PICTURE string specifies a
sign and the SIGN IS SEPARATE clause is specified, the sign is represented as characters + or -. If
SIGN IS SEPARATE is not specified, the sign is one hexadecimal digit that overlays the first 4 bits of
the sign position (leading or trailing).
#
85 COBOL Standard
The COBOL language defined by the following standards:
• ANSI INCITS 23-1985, Programming languages - COBOL, as amended by ANSI INCITS 23a-1989,
Programming Languages - COBOL - Intrinsic Function Module for COBOL and ANSI INCITS 23b-1993,
Programming Languages - Correction Amendment for COBOL
394 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• ISO 1989:1985, Programming languages - COBOL, as amended by ISO/IEC 1989/AMD1:1992,
Programming languages - COBOL: Intrinsic function module and ISO/IEC 1989/AMD2:1994,
Programming languages - Correction and clarification amendment for COBOL
2002 COBOL Standard
The COBOL language defined by the following standard:
• INCITS/ISO/IEC 1989-2002, Information technology - Programming languages - COBOL
2014 COBOL Standard
The COBOL language defined by the following standard:
• INCITS/ISO/IEC 1989:2014, Information technology - Programming languages, their environments
and system software interfaces - Programming language COBOL
Glossary 395
396 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
List of resources
Softcopy publications
The following collection kits contain Enterprise COBOL and other product publications. You can find them
at https://www.ibm.com/resources/publications.
• z/OS Software Products Collection
• z/OS and Software Products DVD Collection
Support
If you have a problem using Enterprise COBOL for z/OS, see the following site that provides up-to-date
support information: https://www.ibm.com/support/pages/node/6560933.
Related publications
z/OS library publications
You can find the following publications in the z/OS library.
Run-Time Library Extensions
• Common Debug Architecture Library Reference
• Common Debug Architecture User’s Guide
• DWARF/ELF Extensions Library Reference
z/Architecture
• Principles of Operation
z/OS DFSMS
• Access Method Services for Catalogs
• Checkpoint/Restart
• Macro Instructions for Data Sets
• Using Data Sets
398 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
• API (EXEC CICS) Reference
• Developing CICS System Programs
• Global User Exit Reference
• XPI Reference
• Using EXCI with CICS
IBM z/OS Debugger (formerly IBM Debug for z Systems and Debug Tool)
You can find information about IBM z/OS Debugger in the IBM z/OS Debugger library.
IMS
• Application Programming API Reference, SC18-9699
• Application Programming Guide, SC18-9698
Java
• IBM SDK for Java - Tools Documentation, publib.boulder.ibm.com/infocenter/javasdk/tools/index.jsp
• The Java 2 Enterprise Edition Developer's Guide, download.oracle.com/javaee/1.2.1/devguide/html/
DevGuideTOC.html
• Java 2 on z/OS, www.ibm.com/servers/eserver/zseries/software/java/
• The Java EE 5 Tutorial, download.oracle.com/javaee/5/tutorial/doc/
• The Java Language Specification, Third Edition, by Gosling et al., java.sun.com/docs/books/jls/
List of resources 399
• The Java Native Interface, download.oracle.com/javase/1.5.0/docs/guide/jni/
• JDK 5.0 Documentation, download.oracle.com/javase/1.5.0/docs/
JSON
• JavaScript Object Notation (JSON), www.json.org
XML
• Extensible Markup Language (XML), www.w3.org/XML/
• Namespaces in XML 1.0, www.w3.org/TR/xml-names/
• Namespaces in XML 1.1, www.w3.org/TR/xml-names11/
• XML specification, www.w3.org/TR/xml/
400 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
Index
Index 401
CICS (continued) COBOL for MVS & VM (continued)
call considerations upgrading to Enterprise COBOL 99
supported under Language Environment 291 COBOL for OS/390 & VM
converting source programs upgrading to Enterprise COBOL 99
automatically (CCCA) 284 COBOL/370
DATE special register 56 upgrading to Enterprise COBOL 99
effect of TRUNC compiler option 230 CODE-SET clause, FS 39 325
integrated translator 230 comment lines
migrating separate translator to integrated translator in VS COBOL II programs 89
230 comments
OS/VS COBOL programs, support for 45, 227 sending liv
required compiler options communication feature 55
CICS 229 comparing group to numeric packed-decimal item 62
NODYNAM 229, 231 compatibility
RENT 229 Java and COBOL 253
CICS compiler option 12, 229, 231 object-oriented syntax 253
CICS integrated translator compilation
benefits of 230 Report Writer programs 53
CBL/PROCESS statements, considerations for 230 compiler limits 319
comment lines, considerations for 230 compiler options
DFHCOMMAREA considerations 230 complete list 295
migrating from separate translator 230 for compiling VS COBOL II programs 95
TRUNC compiler option considerations 231 for converted OS/VS COBOL programs 85
CLOSE statement for OS/VS COBOL, not supported 86
DISP phrase unsupported 56 for SOM-based object-oriented COBOL, not supported
FOR REMOVAL phrase 62 137
POSITIONING phrase 56 required for CICS integrated translator 231
CMPR2 114 upgrading from IBM COBOL 139
CMPR2 compiler option complexity ratings
ALPHABET clause 106 conversion priorities relating to 34
ALPHABETIC class 107 conversion priority 32
CALL...ON OVERFLOW class 107 Controlling suppression of warning messages
COPY statement 111 IGZ2OPT 341
COPY...REPLACING statement 109 OS/VS COBOL 341
definition for 104 conversion priority
EXIT PROGRAM 115 complexity ratings relating to 34
file status codes 112 conversion tools
for converted VS COBOL II programs 96 CICS Application Migration Aid 30
language differences from NOCMPR2 105 CMPR2 compiler option 30
not available with Enterprise COBOL 13 COBOL Conversion Tool (CCCA) 29, 53, 284
PERFORM statement 117 FLAGMIG compiler option 30
PERFORM...VARYING...AFTER 119 FLAGMIG4 compiler option 30
PICTURE clause 121 free COBOL Analyzer 287
PROGRAM COLLATING SEQUENCE 123 MIGR compiler option 30, 53, 279
READ INTO and RETURN INTO 124 NOCOMPILE compiler option 30
RECORD CONTAINS n CHARACTERS 125 Report Writer Precompiler 30, 286
scaled integers and nonnumerics 108 z/OS Debugger Load Module Analyzer 287
SET...TO TRUE 126 converting source
SIZE ERROR on MULTIPLY and DIVIDE 128 IBM COBOL programs, requiring 99
UNSTRING statement 129 scenarios
upgrading programs compiled with 104 Report Writer discarded 37
upgrading VS COBOL II programs compiled with 89 Report Writer retained 38
UPSI switches 134 with CICS 37
variable-length group moves 135 without CICS or report writer 36
variable-length records 125 tasks when updating 39
COBOL COPY statement 72
and Java COPY statement, using @, #, $ 111
compatibility 253 COPY...REPLACING statement 109
COBOL and CICS/VS Command Level Conversion Aid COPYLOC compiler option 169, 186
detailed description 284 COPYRIGHT compiler option 186
ISAM file conversion 55 COUNT compiler option 86
COBOL applications CURRENCY-SIGN clause 72
taking an inventory of (source) 31 CURRENT-DATE special register 56
COBOL for MVS & VM customer support 397
402 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
D Enterprise COBOL (continued)
upgrading VS COBOL II programs to 16
DATA DIVISION, two periods in a row 65 user-written condition handlers restrictions
data-name, unique compared to program-id 66 197
DATA(24) compiler option Enterprise COBOL compiler limits 319
or converted OS/VS COBOL programs 85 Enterprise COBOL programs
DATE FORMAT language elements existing applications, adding to 213
support removed 159 Enterprise COBOL, upgrading OS/VS COBOL programs to 15
DATE special register 56 ENTRY points 72
DATEPROC compiler option 192 ENVIRONMENT DIVISION, two periods in a row 65
Db2 errors
coprocessor considerations 235 subscripts out of range message 80
coprocessor integration 233 evaluation changes in relation conditions 70
coprocessor migration 237 EVENTS compiler option
coprocessor, benefits of 233 not available in Enterprise COBOL 141
separate precompiler 233 EXAMINE statement 57
debug information changes 153, 162, 206, 219 EXEC CICS LINK
Debug Tool 4, 221 support under Language Environment 291
debugging EXEC CICS statement 231
full screen mode 224 EXEC DLI statement 231
initiating the Debug Tool 219 executables
remote mode 224 residing in PDSE data sets 3, 198
DEBUGGING declarative 80 EXHIBIT statement 57
decimal overflow, program mask and 292 existing applications
declaratives adding Enterprise COBOL programs to 213
changes to LABEL declarative support 183 preventing file status 39 325
debugging changes 80 EXIT compiler option 189
GIVING phrase of ERROR 58 EXIT PROGRAM statement
DEFINE compiler option 169, 186 differences between CMPR2 and NOCMPR2 115
DFHCOMMAREA exponent underflow, program mask and 292
integrated CICS translator, considerations for 230 exponentiation changes 69
DIAGTRUNC compiler option Extended Link Pack Area (ELPA) 231
for converted OS/VS COBOL programs 85 extensions, undocumented 61, 92
disability 347 External names, changed in Enterprise COBOL 137
DISP phrase of CLOSE 56
DISPLAY statement 57
DISPSIGN compiler option 186
F
DIVIDE statement 77, 128 FAQ 241
dynamic calls FD support in REDEFINES clause 66
CICS considerations FDUMP compiler option
supported under Language Environment 291 mapped to TEST 96
placed to alternate entry points 72 feedback
supported under non-CICS under Language sending liv
Environment 289 file status 39
avoiding when processing new files 326
E preventing for QSAM files 325
preventing for VSAM files 59
education FILE STATUS clause 72
available for Enterprise COBOL 30 file status code
EGCS 368 39 93, 102, 150
enclave boundary with assembler programs 289 file status codes, CMPR2/NOCMPR2 112
ENDJOB compiler option 86 FILE-CONTROL paragraph
Enterprise COBOL FILE STATUS clause changed 72
advantages of 6 FILE-LIMIT clause unsupported 58
changes with 13 files
compiler options, complete list 295 preventing file status 39 325
compiler options, unsupported 96 fixed-length records, defining 325
high level overview 4 fixed-point overflow, program mask and 292
installing, documentation needed 29 FLAGMIG compiler option
JCL changes 196 definition for 105
logical record length 91 not available with Enterprise COBOL 13, 96, 283
prolog format changes 87 FLAGSAA compiler option 96
reserved words, complete list 255 floating comment indicators (*>) 369
upgrading IBM COBOL programs to 16 floating-point changes 69
Index 403
flow of control, ended 62, 115 inventory of applications (continued)
FOR REMOVAL phrase of CLOSE statement 62 for upgrading source to Enterprise COBOL 30
Format-x (F,S,U,V) files 325 free COBOL Analyzer 287
free COBOL Analyzer 287 z/OS Debugger Load Module Analyzer 287
Frequently asked questions 241 INVOKE statement 136, 137
FROM, requirements with ACCEPT statement 62 IS evaluation in relation conditions changed 72, 77
ISAM files 55
G
J
GENERATE statement 54
Glossary 353 Java
GO TO MORE-LABELS 58 and COBOL
GOBACK statement compatibility 253
differences between CMPR2 and NOCMPR2 115 javac command
recompile for Java 253
JAVAIOP compiler option 170, 187
H JUSTIFIED clause 75
HGPR compiler option 186
K
I keyboard navigation 347
IBM COBOL keyword 375
upgrading source, requiring 16, 99
upgrading to Enterprise COBOL 99 L
IDCAMS REPRO facility 55
IDLGEN compiler option LABEL RECORD clause 63
not supported in Enterprise COBOL 137 LABEL RECORDS clause 58
IF statement 75 LANGLVL compiler option
IGYPG3188 143 unsupported 86
IGYPG3189 143 LANGLVL(1) compiler option
IGZ0005S 291 /, =, and L characters 72
IGZ0079S 291 ACCEPT MESSAGE COUNT 55
IGZ0193W 143 combined abbreviated relational conditions 70
IGZ0194W 143 COPY statement with associated names 72
IGZERRE routine DELIMITED BY ALL 81
for upgrading assembler driver 293 JUSTIFIED clause 75
ILBOSTP0 NOT phrase 71
assembler driver, alternatives for 293 PERFORM statement 79
in Enterprise COBOL 5 and 6 181 RESERVE clause 78
in Enterprise COBOL 6 167 scaling change 75
index names SELECT OPTIONAL clause 79
qualified 63 LANGUAGE compiler option
INHERITS clause 136 from Enterprise COBOL 6 171, 189
INITCHECK compiler option 169, 171, 186, 189 language elements
INITIAL compiler option 169, 186 changed
INITIATE statement 54 OS/VS COBOL 69
inline comments 372 SOM-based object-oriented COBOL 137
INLINE compiler option 169, 186 not supported
INSPECT statement OS/VS COBOL 54, 56
EXAMINE statement 57 SOM-based object-oriented COBOL 136
TRANSFORM statement 61 Language Environment
installation advantages of 6
compiler, documentation needed 29 Language Environment-conforming assembler programs 292
INTDATE compiler option LE’s writable static area (WSA) 176, 208
for converted IBM COBOL programs 140 LINE-COUNTER special register 54
integrated CICS translator Link Pack Area (LPA) 231
required compiler options 231 link-editing 198, 249
integrated Db2 coprocessor 233 LIST compiler option 87, 97
Integrated Db2 coprocessor 14 List of resources 397
integrated SQL coprocessor 233 LISTER features, unsupported 87
intermediate results changed 77 LOAD/BALR calls supported under Language Environment
INVDATA compiler option 170, 187 289
inventory of applications LP compiler option 170, 187
404 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
LVLINFO compiler option NOLIB compiler option 192
LVLIINFO not available from Enterprise COBOL 6 172, NOMINAL KEY clause 55
192 nonnumerics, CMPR2/NOCMPR2 108
nonunique program-id names 66
NORENT compiler option
M above the line support 13
MAP compiler option 190 NORENT static area 176, 208
MAXPCF compiler option NORES compiler option
from Enterprise COBOL 6 172 unsupported in Enterprise COBOL 96
MDECK compiler option 190 NOSTGOPT compiler option
MEMLIMIT for converted OS/VS COBOL programs 85
for compiling programs xlii, 173, 194 from Enterprise COBOL 6 172, 190
message IGZ0005S 291 NOT phrase 71
message IGZ0079S 291 NOTE statement 58
messages NSYMBOL compiler option
MIGR, missing for RENAMES 67 for converted IBM COBOL programs 140
METACLASS clause 137 NUMCHECK compiler option
METHODS, changed in Enterprise COBOL 137 migrating to NUMPROC(PFD) 96, 141, 151, 161, 193,
METHODS, not supported in Enterprise COBOL 137 308
MIGR compiler option numeric-edited, differences 65
conversion tool 53, 279 NUMPROC compiler option
message missing for RENAMES 67 for converted OS/VS COBOL programs 85
migrating CICS translator NUMPROC(MIG) not available from Enterprise COBOL 5
from separate to integrated 230 151, 161, 193
migrating from CMPR2 to NOCMPR2 104 NUMPROC(MIG) not available in Enterprise COBOL 5 96,
Migrating from XMLPARSE(COMPAT) 333 141, 308
migrating source
scenarios O
Report Writer discarded 37
Report Writer retained 38 OBJECT COMPUTER paragraph 123
with CICS 37 object module 249
without CICS or report writer 36 object module, prolog format 87, 97
tasks when updating 39 object-oriented COBOL
migration tools compatibility 253
COBOL and CICS/VS Conversion Aid (CCCA) 284 object-oriented COBOL, SOM-based
free COBOL Analyzer 287 compiler options not supported 137
Report Writer Precompiler 286 language elements changed 137
z/OS Debugger Load Module Analyzer 287 language elements not supported 136
mnemonic-name of system input devices in ACCEPT not supported in Enterprise COBOL 136
statement 91 OBJECTS, changed in Enterprise COBOL 137
MOVE ALL statement OCCURS clause 64
to PIC 99 64 OCCURS DEPENDING ON clause
MOVE statement changes in values for receiving items 76
CORRESPONDING changes 63 RECORD CONTAINS n CHARACTERS 66
moving fullword binary items 63 variable-length group moves 135
multiple TO specification 64 OCx abends 291
scaling change 75 ODO objects, changes for variable-length groups 90
SET...TO TRUE 126 ON SIZE ERROR phrase 77
warning message for numeric truncation 64 ON statement 58
MULTIPLY statement 77, 128 OPEN statement
COBOL 68 support dropped 59
REVERSED phrase changed 65
N OPTIMIZE compiler option 190
national extension characters 111 options
new reserved words 148, 159 compiler
NOCMPR2 114 complete list 295
NOCMPR2 compiler option for IBM COBOL programs 139
definition for 105 for OS/VS COBOL programs 85
language differences from CMPR2 105 for VS COBOL II programs 95
NOCMPR2 programs ORGANIZATION clause 55
tools for converting source to 279 OS/VS COBOL
NOCOMPILE compiler option 86 ALPHABET-NAME clause changed 69
NODYNAM compiler option 229, 231 arithmetic accuracy 69
ASSIGN clause changed 69
Index 405
OS/VS COBOL (continued) periods (continued)
ASSIGN TO integer system-name clause 56 multiple in any division 65
CALL statement changed 70 requirements for Area A 65, 92
compiler options, complete list 295 PGMNAME compiler option
considerations when compiling 85 for converted IBM COBOL programs 140
CURRENCY-SIGN clause changed 72 for converted OS/VS COBOL programs 85
IF statement changed 75 PICTURE clause
intermediate results changed 77 B symbol in 69, 121
JUSTIFIED clause 75 numeric-edited differences 65
OCCURS DEPENDING ON clause 76 use with VALUE clause 68
ON SIZE ERROR phrase changed 77 POSITIONING phrase of CLOSE 56
PERFORM statement changes 78 PPA4
PROGRAM COLLATING SEQUENCE clause 78 how to find 176, 207
READ statement changes 78 layout 176, 208
RERUN clause changes 78 precedence of USE procedures 90
RESERVE clause changes 78 prerequisite software level 167, 181
reserved word list PROCEDURE DIVISION, two periods in a row 65
complete list 255 product support 397
RETURN statement changes 78 program checks causing ASRA abend 291
scaling changed 75 PROGRAM COLLATING SEQUENCE clause
SEARCH statement changes 79 alphabet-name, implicit comparisons 78
segmentation changes 79 difference between CMPR2 and NOCMPR2 123
SELECT OPTIONAL clause 79 program mask, programs that change it 292
SORT special register differences 80 program names
source language debugging 80 compatibility 85, 95
subscripts out of range 80 requirements 66
undocumented extensions for 61 program object analysis
unsupported compiler options 86 free COBOL Analyzer 287
UPSI switch evaluation changed 81 z/OS Debugger Load Module Analyzer
VALUE clause 82 287
VSAM files 74, 75 program objects
WHEN-COMPILED 82 inventory of, using conversion tool 287
WRITE AFTER POSITIONING statement 82 program static area 176, 208
OS/VS COBOL compiler limits 319 prolog format 87, 97
OS/VS COBOL programs PTFs
CICS considerations installing in Enterprise COBOL 5 and 6 182
support for 227 publications 397
OS/VS COBOL, upgrading source 15
OSDECK compiler option 87
OUTDD compiler option
Q
for converted OS/VS COBOL programs 85 QSAM buffer
initializing 345
P QSAM files
preventing files status 39 325
PAGE-COUNTER special register 54 status key values 73
paragraph names qualification - using the same phrase repeatedly 66
error for period missing in 65 qualified index names 63
requirements for Enterprise COBOL 66, 70 QUALIFY compiler option 187
restrictions for USING phrase 70 QUEUE runtime option 56
parameters
restrictions for paragraph names 70
parenthesis evaluation changed 71
R
PARMCHECK compiler option 170, 187 RCFs
PDS data sets 196, 249 sending liv
PDSE data sets READ statement
migrating to 25 implicit elementary MOVEs 78
PERFORM statement INTO phrase, CMPR2/NOCMPR2 124
difference between CMPR2 and NOCMPR2 117 reader comments
second UNTIL 65 sending liv
VARYING/AFTER options 119 READY TRACE statement, not supported 59
VARYING/AFTER phrases 78 RECEIVE statement 56
periods receiving fields, ODO objects 135
missing at end of SD, FD, or RD 65 RECORD CONTAINS n CHARACTERS clause
missing on paragraph names 65
406 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
RECORD CONTAINS n CHARACTERS clause (continued) SD support in REDEFINES clause 66
difference between CMPR2 and NOCMPR2 125 SEARCH ALL 104, 143
when overridden 66 SEARCH statement 79
RECORD CONTAINS, fixed-length records 325 SEEK statement unsupported 55
records, preventing FS 39 when defining 325 segmentation 79
REDEFINES clause SELECT clause 79
FD support dropped 66 sending fields, ODO objects 135
SD support dropped 66 sequential files 73
reference modification 90 SERVICE compiler option 188
registers SERVICE RELOAD statement
requirement for assembler programs 289 automated conversion of 284
regression testing SET...TO TRUE, CMPR2/NOCMPR2 126
source considerations 40 significance exceptions, program mask and 292
relation condition simplified TEST compiler option 152
coding changes 67 SIMVRD runtime option 92, 93, 101, 149
evaluation changes 70 SIZE compiler option
REMARKS paragraph 60 SIZE not available from Enterprise COBOL 5 193
RENAMES clause 67 SIZE ERROR on MULTIPLY and DIVIDE 128
RENT compiler option 229, 231 slash (/) in CURRENCY-SIGN clause changed 72
RENT static area 176, 208 SMARTBIN compiler option 170, 188
REPLACE statement SMP/E FIXCAT 182
affecting EXEC CICS 231 SOM-based object-oriented COBOL
REPLACE statement and comment lines 89 compiler options not available 137
REPORT clause 54 language elements changed 137
report section 54 language elements not supported 136
Report Writer not available with Enterprise COBOL 136
conversion scenario discarding 37 SORT special registers 80
conversion scenario retaining 38 SOURCE compiler option
conversion tool 53, 286 from Enterprise COBOL 6 172, 191
language affected 54 source language conversion
Report Writer Precompiler 286 IBM tools 279
Requesting QSAM buffers above the line) inventory of applications 31
IGZ3OPT 343 tasks when updating 39
RERUN clause 78 special registers
RES compiler option CURRENT-DATE 56
unsupported in Enterprise COBOL 96 DATE 56
RESERVE clause 78 LINE-COUNTER 54
reserved words PAGE-COUNTER 54
comparison of 255 PRINT-SWITCH 54
comparison to VS COBOL II 91 SORT differences 80
RESET TRACE statement, not supported 59 TALLY 57
return routine, assembler programs 289 TIME 60
RETURN statement TIME-OF-DAY 60
implicit elementary MOVEs 78 WHEN-COMPILED 82
INTO phrase, CMPR2/NOCMPR2 124 SPECIAL-NAMES paragraph 72, 106
REVERSED phrase of OPEN statement 65 SPM instructions 292
RMODE compiler option 190 SQL
RMODE considerations 215 coprocessor integration 233
RRDS (relative-record data sets) SQL statements
simulating variable-length records 93, 101, 149 Db2 coprocessor, handling 233
RTEREUS runtime option SQLIMS compiler option 188
using with assembler drivers 292 SSRANGE compiler option
RULES compiler option from Enterprise COBOL 5 191
from Enterprise COBOL 6 172, 191 from Enterprise COBOL 6 172, 191
runtime options STACK storage for work area 102
CHECK(OFF) 201 STANDARD LABEL statement 61
HEAP 201 START statement
NOSSRANGE 201 support changed 60
SIMVRD 93, 101, 149 USING KEY clause unsupported 55, 60
STORAGE 201 STATE compiler option 86
statement connectors, THEN unsupported 60
static CALL statement
S supported under Language Environment under CICS
scaled integers, CMPR2/NOCMPR2 108 291
Index 407
static CALL statement (continued) unitialized data sets 195
supported under Language Environment under non- UNSTRING statement
CICS 289 coding not accepted 68
status key difference between CMPR2 and NOCMPR2 129
QSAM files 73 multiple INTO phrases 68
VSAM files 74, 75 upgrading
STGOPT compiler option 188 IBM COBOL programs 16
STOP RUN statement VS COBOL II programs 16
differences between CMPR2 and NOCMPR2 115 Upgrading programs from Enterprise COBOL 3
storage Enterprise COBOL 4, 6, 13, 16, 29, 87, 91, 96, 143, 155,
2 GB BAR xlii, 173, 194 196, 197, 255, 295
subprograms Upgrading programs from Enterprise COBOL 4
dynamic calls to ENTRY points 72 Enterprise COBOL 4, 6, 13, 16, 29, 87, 91, 96, 143, 155,
subroutines, called by assembler driver 292 196, 197, 255, 295
subscripts 80 upgrading source
SUPMAP compiler option 86 IBM COBOL programs, requiring 99
support 397 IBM conversion tools 279
SUPPRESS compiler option 170, 188 scenarios
SVC LINK Report Writer discarded 37
supported under Language Environment under non- Report Writer retained 38
CICS 289 with CICS 37
targeting assembler programs 289 without CICS or report writer 36
SVC LOAD/BALR 293 tasks when updating 39
SVC LOAD/DELETE 293 upgrading, OS/VS COBOL programs 15
SXREF compiler option 87 UPSI switches
SYMDMP compiler option 87 difference between CMPR2 and NOCMPR2 134
system input devices for mnemonic-name suboption in differences with condition-names 81
ACCEPT statement 91 USE procedure
precedence in VS COBOL II 90
USE statement
T BEFORE STANDARD LABEL 61
TALLY special register 57 DEBUGGING declarative 80
TERMINATE statement 54 GIVING phrase of ERROR declarative 58
terminating statements, required 62 LABEL declarative 58
TEST compiler option reporting declarative 54
for converted VS COBOL II programs 95 Using REXX execs
from Enterprise COBOL 5.1 192 processing parameter list formats 331
from Enterprise COBOL 6.2 172, 192
testing V
regression, for source 40
THEN statement 60 VALUE clause
TIME-OF-DAY special register 60 condition-name changes 82
TRACK-AREA clause 55 use with PICTURE clause changed 68
TRACK-LIMIT clause 55 variable length read 202
TRANSFORM statement unsupported 61 variable-length group moves 135
translator option variable-length group, differences 90
XOPTS 230 variable-length records, defining 325
translator, integrated CICS 230 VARYING phrase of PERFORM changed 78
TRUNC compiler option VBREF compiler option 87
for CICS applications 230, 231 VBSUM compiler option 87
for converted IBM COBOL programs 140 VCON
for converted OS/VS COBOL programs 86 supported COBOL/assembler under CICS 291
possible differences using TRUNC(OPT) 63 supported COBOL/assembler under non-CICS 289
TUNE compiler option 171, 188 VLR compiler option 188, 202
TYPECHK compiler option VOLATILE clause 197
not supported in Enterprise COBOL 137 VS COBOL II
compiler options, complete list 295
reserved words, complete list 255
U upgrading source 16
U3504 abends 291 VS COBOL II compiler limits 319
undocumented extensions VS COBOL II programs
for OS/VS COBOL 61 reserved words, comparison 91
for VS COBOL II 92 upgrading source programs 89
VSAM files
408 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
VSAM files (continued)
conversions 55
status key changes 74, 75
VSAMOPENFS compiler option 171, 188
W
WHEN-COMPILED special register 82
WORD(NOOO) compiler option
for converted IBM COBOL programs 141
WORKING-STORAGE
areas explanation 177, 208
how to determine the area 177, 209
WORKING-STORAGE data items 215
WORKING-STORAGE SECTION
how to find 176, 207
in Enterprise COBOL 5 and 6 176, 207
WRITE statement 82
X
XML PARSE statements
COMPAT parser considerations 146, 156
XML parser 145, 155
XMLSS suboption behavior 158
XMLPARSE compiler option 188
XOPTS translator option 230
Z
Z's in PICTURE string 65
z/OS
commonly asked questions and answers 252
z/OS Debugger Load Module Analyzer 287
ZONECHECK compiler option
ZONECHECK not available from Enterprise COBOL 6
173, 193
ZONEDATA compiler option 189
Index 409
410 Enterprise COBOL for z/OS: Enterprise COBOL for z/OS 6.4 Migration Guide
IBM®
GC27-8715-03