Migration recommendations to Enterprise COBOL V5 and V6
Migration to Enterprise COBOL V5 and V6 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 V5 or V6.
Regression tests
The recommended
migration strategy for Enterprise COBOL V5 and V6 is to compile
each application (group of programs) with COBOL V5 or V6 using NUMCHECK,
PARMCHECK, SSRANGE, and OPT(0),
and regression test the application alongside the same application
in its current form (that is, compiled with Enterprise COBOL V4 or
earlier compilers). If you do not get any NUMCHECK, PARMCHECK, or
SSRANGE errors, and you are sure that you get the same results with
the new compiler as with the earlier compilers, recompile with NONUMCHECK, NOPARMCHECK,
NOSSRANGE, OPT(2), and INITCHECK.
At this point, check for compile-time warnings from INITCHECK. If
there are none, then run a final test and move the application into
production. The reason for testing with NUMCHECK, PARMCHECK, and SSRANGE
is that some customers have found that they have invalid COBOL data
that gets different results with COBOL V5 or V6. INITCHECK can
find (at compile time) cases of uninitialized data which could also
cause migration problems.


Best practices
Instead of treating Enterprise COBOL V5 and V6 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 V5 and V6.
Common problems and solutions
- Invalid data in numeric USAGE DISPLAY data items
- Parameter/argument size mismatches
Overpopulated binary data items, with values that have more digits than are defined in the data definitions in programs compiled with TRUNC(STD) or TRUNC(OPT)
Uninitialized data items, or data items that are used without first being set
- Always compile with RULES(NOEVENPACK) and DIAGTRUNC.
Use the "Scanning COBOL programs for compatibility" feature of
IBM® Developer for z Systems®
(IDz) V9.5 or later versions to check parameters and arguments. For details, see Scanning COBOL programs for compatibility.
Compile with NUMCHECK, PARMCHECK, SSRANGE, and OPT(0) for initial code changes and unit tests.
Recompile with NONUMCHECK, NOPARMCHECK, NOSSRANGE, OPT(2), and INITCHECK, for quality assurance tests and production.