Start of change

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

Start of changeThe recommended migration strategy for Enterprise COBOL V5 and V6 is to compile each application (group of programs) with COBOL V5 or V6 using INITCHECK, NUMCHECK, PARMCHECK, and SSRANGE, 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 INITCHECK, 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 NOINITCHECK, NONUMCHECK, NOPARMCHECK, and NOSSRANGE, and move the application into production. The reason for compiling with INITCHECK, 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. End of change

Note: Start of changeYou do not have to do this extra testing for programs that have already been compiled with Enterprise COBOL V5 or V6. End of change

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

Some customers have reported problems caused by 'invalid COBOL data' that cannot be detected by inspecting source code when they migrate to Enterprise COBOL V5 or V6, and the most common problems are as follows:
  • Invalid data in numeric USAGE DISPLAY data items
  • Parameter/argument size mismatches
  • Start of changeOverpopulated 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)End of change
To identify these problems more easily, consider the following solutions:
  • Always compile with RULES(NOEVENPACK) and DIAGTRUNC.
  • Start of changeUse the "Scanning COBOL programs for compatibility" feature of Start of changeIBM® Developer for z/OS®End of change to check parameters and arguments. For details, see Scanning COBOL programs for compatibility.End of change
  • Start of changeCompile with INITCHECK, NUMCHECK, PARMCHECK, and SSRANGE for initial code changes and unit tests.End of change
  • Start of changeRecompile with NOINITCHECK, NONUMCHECK, NOPARMCHECK, and NOSSRANGE for quality assurance tests and production.End of change
End of change