Prerequisite upgrade tasks

Ensure the following tasks have been completed before upgrading to Enterprise COBOL for z/OS. These tasks include checking for COBOL interoperability problems, upgrading to the 85 COBOL Standard, moving PDS load libraries to PDSE, and upgrading to Language Environment.

Important:
  • Do not try to switch from the Db2 precompiler to integrated Db2 coprocessor or migrate to CICS translator at the same time as your COBOL compiler migration.
  • Do not migrate z/OS, Db2 or CICS at the same time as a COBOL compiler migration. COBOL migration is a significant migration on its own.

Check for COBOL interoperability problems

This task is often completed by a application architect.

Enterprise COBOL 5 and 6 programs cannot interoperate with OS/VS COBOL or VS COBOL II NORES programs in a single application.

To find out if you have OS/VS COBOL or VS COBOL II NORES programs:
  • Use COBOL Upgrade Advisor for z/OS® to run an inventory scan to discover what compiler versions are used in your load libraries or applications.
  • Enable Language Environment to put out a message whenever an OS/VS COBOL program is run. To enable this warning message, set up IGZEOPT.

    The following is an example of the embedded HLASM code inside the JCL:

    IGZUOPT CSECT
    IGZUOPT AMODE 31
    IGZUOPT RMODE ANY
    *
      IGZXOPT SUPP_OSV=ON * ON: Suppress warning
           * ONCE: Only issue 1 warning
           * OFF: issue warning 
    END
Interoperability can be separated by three generations of compilers:
Table 1. Interoperability between generations of compilers within a single application
Generation A (Gen A) Generation B (Gen B) Generation C (Gen C)
  • OS/VS COBOL
  • VS COBOL II NORES
  • VS COBOL II RES
  • COBOL/370 and COBOL for MVS
  • COBOL for OS/390
  • Enterprise COBOL 3
  • Enterprise COBOL 4
  • Enterprise COBOL 5
  • Enterprise COBOL 6
Generations A and B can interoperate within a single application.  
  Generations B and C can interoperate within a single application.
Scenario 1: If your application only consists of Generation A, you can either:
  • Mass recompile: Upgrade all Gen A programs to Gen C at once. You cannot upgrade Gen A programs one by one to Gen C because Gen C programs cannot interoperate with Gen A programs in a single application.
  • Gradually recompile in stages: Upgrade Gen A programs one by one to Gen B. Once upgraded to Gen B, upgrade the Gen B programs again one by one into Gen C.
    Note: In general, no intermediate 'stages' are required for your upgrade to Enterprise COBOL 6, this is an exception. This may only be needed if the mass recompile option is not suitable.
Scenario 2: If your application consists of Generation A and B, you can either:
  • Mass recompile: Upgrade all the Gen A programs to Gen C at once, then follow by upgrading the Gen B programs to Gen C at once.
  • Gradually recompile in stages: Upgrade Gen A programs one by one to Gen B. Once all programs are Gen B, upgrade the Gen B programs one by one into Gen C.
Scenario 3: If your application only consists of Generation B:
  • No special considerations. You may upgrade programs one by one from Gen B to Gen C or all at once.

When running a mixture of VS COBOL II NORES programs and Enterprise COBOL 5 or 6 programs:

  • A current version of IGZEBST is required:
    • For statically CALLed programs in CICS®, you will need to replace IGZEBST in applications with VS COBOL II programs with the IGZEBST from LE with the PTFs for APAR PI33330 installed.
      Note: IGZEBST from LE with the PTFs for APAR PI33330 installed can also be used with any COBOL programs VS COBOL II and later without COBOL 5 or 6 programs.
    • For dynamically CALLed CICS programs, you just need to install the PTFs for APAR PI25079 on SCEERUN.
      Note: For statically CALLed programs in non-CICS, performance will be better if you replace IGZEBST in applications with VS COBOL II programs with the IGZEBST from LE with the PTFs for APAR PI33330 installed. It is not required. There is no issue with IGZEBST for dynamically called programs in non-CICS for calling VS COBOL II programs from COBOL 5 or 6 programs.
  • A current version of CEEBETBL, the Language Environment® externals table, is required. If you are including object code bound some time ago with your COBOL 5 or 6 object code, you might be indirectly including an old version of CEEBETBL.

    If the length of CEEBETBL you bind is less than x'28' (or the length of the CEEBETBL in the current SCEELKED library), it is old and needs to be replaced, or you will encounter runtime abends or a terminating runtime message.

    If you rebind older object code with COBOL 5 or 6 as part of your migration, it is recommended that you specifically INCLUDE a current copy of CEEBETBL prior to INCLUDEs of the older object code, taking care that you do not inadvertently make CEEBETBL the entry point.

For more information, refer to Interoperability with older levels of IBM COBOL programs.

Update source code to the 85 COBOL language standard

This task is often completed by a COBOL application developer.

Any programs compiled with the 68 COBOL Standard, 74 COBOL Standard, or with the CMPR2 option need to be updated to the 85 COBOL Standard before they can be compiled in Enterprise COBOL.

This includes:
  • All customers using OS/VS COBOL
  • All customers using VS COBOL II 1.1 or VS COBOL II 1.2
  • Customers using any of the following compilers with the CMPR2 option:
    • VS COBOL II 1.3
    • VS COBOL II 1.4
    • COBOL/370 1.1
    • COBOL for MVS & VM 1.2
    • COBOL for OS/390 2.1
    • COBOL for OS/390 2.2
Note: This is a rare scenario but may cause issues if left unaddressed. COBOL Upgrade Advisor for z/OS checks if this is a task that needs to be completed for your programs.

Tasks may vary depending on which version of the compiler you are upgrading from. Refer to Upgrading programs for specific information about upgrading to the 85 COBOL Standard from each compiler version. IBM COBOL and CICS Command Level Conversion Aid for z/OS (CCCA) can help you complete this upgrade step. For more information, refer to COBOL and CICS Command Level Conversion Aid for z/OS (CCCA).

Move PDS data sets to PDSE data sets

This task is often completed by a system programmer.

To upgrade to Enterprise COBOL 5 and later, executables must be in PDSE data sets/load libraries. Any COBOL executables (load modules or program objects) in PDS data sets/load libraries must be moved to PDSE datasets.

To move your PDS load libraries to PDSE load libraries, copy the members to PDSE data sets and use PDSE data sets for your load libraries. IBM recommends that you allocate your PDSE load library data sets with RECFM=U, DSNTYPE=LIBRARY, and VERSION=2, and leave all the other attributes blank, like in the following example:
Record format . . . . U        
Record length . . . .          
Block size  . . . . .        
Data set name type    LIBRARY  
Data set version  . : 2        

Upgrade to Language Environment

This task is often completed by a system programmer.

Earlier COBOL programs can run under several different runtime libraries, including Language Environment. If any of your programs are still using old runtime library routines such as the OS/VS COBOL runtime library or the VS COBOL II runtime library, you need to make sure that they are only using Language Environment. For more information on runtime libraries across IBM COBOL compilers, refer to the Runtime libraries for COBOL programs section of COBOL compiler versions, required runtimes, and support information.

To check if your programs use Language Environment, ensure all of the following statements are true:
  • 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.
Tip: The IBM COBOL Upgrade Advisor for z/OS application scan can check if your application uses Language Environment or not. If you have COBOL Upgrade Advisor for z/OS, skip this list and run an application scan.
If everything is verified, the program uses the Language Environment runtime library. If any of the statements are false, upgrade to Language Environment using the following steps:
  1. Add Language Environment to the LNKLST/LPALST. This moves Language Environment into production, and all COBOL applications will run under Language Environment by default.
    • The only COBOL runtime library present should be SCEERUN. Remove any instances of COBLIB, VSCLLIB, or COB2LIB in JCL STEPLIB or JOBLIB statements or in CICS startup JCL.
    • Note: Only use one library for a given language in LNKLST/LPALST. For example, if you install Language Environment with the COBOL component in LNKLST/LPALST, do not have the OS/VS COBOL library or the VS COBOL II library installed in LNKLST/LPALST.
    Optional: Add Language Environment to the STEPLIB JCL. This is a more gradual approach where Language Environment is phased in one region (CICS or IMS) or user (TSO) at a time.
    Note: Programs run slower and use more virtual storage with this approach than using LNKLST/LPALST to access Language Environment.
  2. For programs compiled with NORES, use REPLACE linkage-editor control statements to replace the existing runtime library routines compiled with Language Environment versions.
  3. Ensure that SCEERUN is the only COBOL runtime library available in LNKLST/LPALST. Remove any other COBOL runtime libraries present, such as COBLIB, VSCLLIB, or COB2LIB.
  4. For VS COBOL II programs IGZEBST bootstrap models compiled with RES, do one of the following tasks:
    • Link to a runtime version of IGZEBST with APAR PN74000 applied
    • REPLACE with IGZEBST from Language Environment

For more information, refer to Chapter 3. Planning the move to Language Environment in the Enterprise COBOL 4.2 Compiler and Runtime Migration Guide for help in completing your runtime library upgrade.