6 Migrating COBOL Applications from IMS on z/OS to Oracle Tuxedo Application Runtime for IMS Users on UNIX

To migrate the COBOL applications running under the control of IMS on z/OS, you must do the following steps:

  1. Convert the COBOL source code using ART Workbench
  2. Customize configurations files of Tuxedo ART for IMS according to IMS Macros on z/OS,
  3. Define and start an Oracle Tuxedo application consisting of Tuxedo ART for IMS servers, and executing desired COBOL applications by submitting a transaction code on 3270 terminal or run a JOB by ART Batch runtime.

6.1 Converting COBOL Programs

The COBOL source programs from IMS on z/OS should be firstly converted by ART Workbench. After converting, the converted source program can be compiled with Micro Focus COBOL or COBOL-IT compiler to.gnt files. For the details of converting COBOL source programs, please refer to the documents of ART Workbench. For the details of compiling COBOL source programs, please refer to the documents of Micro Focus COBOL or COBOL-IT.

For example, two COBOL source programs are converted and compiled.

DFSIVAP1.cbl (compiled toDFSIVAP1.gnt) is a MPP program

DFSIVAP2.cbl (compiled toDFSIVAP2.gnt) is a BMP program

The .gnt files should be put under $COBPATH (Micro Focus COBOL) or $COB_LIBRARY_PATH (COBOL-IT).

6.2 Implementing COBOL Program Debugging in IMS Runtime

The section contains the following topics:

6.2.1 Use Case 1

Two users want to debug two MF BMP COBOL programs respectively.

User A wants to debug COBOL Program1 and user B wants to debug COBOL Program2, do the following steps:

  1. Add COBOL debug information to the imsdebug.desc configuration file as follows.
    [cobol]
    USER=A
    APPNAME=program1
    DEBUGID=myDebugID1
    [cobol]
    USER=B
    APPNAME=program2
    DEBUGID=myDebugID2
    
  2. Start up ART IMS servers.

    User A and B starts their own ART IMS servers with the same Linux account which starts up the anim utility. Only the DEBUGID which the anim utility specifies is debugged.

  3. Input anim command lines.

    User A inputs the following command line from the terminal: anim %XmyDebugID1.

    User B inputs the following command line from the terminal: anim %XmyDebugID2.

  4. Start up the COBOL program and debug it.

6.2.2 Use Case 2

A user wants to debug all CIT COBOL programs in one transaction.

User C wants to debug COBOL Program1 and Program2 in transaction tranA, do the following steps:

  1. Add COBOL debug information to the imsdebug.desc configuration file as follows:
    [cobol]
    USER=C
    TRANNAME=tranA
    DEBUGID = 111
  2. Input deet command lines.

    User C inputs the following command line from the terminal: Deet -p 111, and then debug.

    Note:

    You must detach when debugging is complete.

6.3 Customizing Configuration Files

To run a COBOL application migrated from IMS on z/OS in Tuxedo ART for IMS, some critical configuration files have to customized based on the IMS Macros related to the COBOL application.

To run an MPP program, there must be a transaction code corresponding to the program as shown in Listing 1.

Listing 1 imstrans.desc Example

[imstran]
name=TRAN1
response=no
edit=ULC
appname=DFSIVAP1
class=1

The transaction code TRAN1 corresponds to application DFSIVAP1.

Each COBOL application must have its specific definition to identify it is an MPP or BMP (BMPT) program (TP or BATCH).The following Listing shows an imsapps.desc example that defines two applications.

Listing 2 imsapps.desc Defining Two Applications

[imsapp]
name=DFSIVAP1
type=TP

[imsapp]
name=DFSIVAP2
type=BATCH

To run any applications in IMS, one PSB is required. In Tuxedo ART for IMS, PSB macro for an application is mapped to a .psb configuration file. For MPP program, the prefix of its .psb file should be the application name (i.e., $appname.psb; for BMP and BMPT programs, the prefix of its .psb file can be any name that complies to the naming rule of IMS applications. The .psb files for DFSIVAP1 and DFSIVAP2 are shown as below. One I/O PCB plus the PCBs defined in .psb are passed to the COBOL program as its parameters when the program is invoked.

Listing 3 DFSIVAP1 and DFSIVAP2 .psb Examples

DFSIVAP1.psb
[imspcb]
modify=yes
express=no

[imspcb]
modify=yes
express=no

From DFSIVAP1.psb, we can conclude that application DFSIVAP1 requires one I/O PCB and two alternate PCBs as its arguments.

Listing 4 DFSIVAP1 with two Alternate PCBs

DFSIVAPX.psb
[imspcb]
type=GSAM
name=DFSIVD5I
procopt=G

[imspcb]
type=GSAM
name=DFSIVD5O
procopt=LS

[imspcb]
type=GSAM
name=TSTIVD5O
procopt=LS

From DFSIVAPX.psb, we can conclude that application DFSIVAP2 requires one I/O PCB and three GSAM PCBs.

For more information, see Oracle Tuxedo Application Runtime for IMS Reference Guide

6.4 Defining an Oracle Tuxedo Application

To run a IMS COBOL application in Tuxedo ART for IMS, following servers must be started in a Tuxedo application:

ARTICTL - The server responsible for connection with 3270 terminals

ARTIMPP - The server responsible for executing MPP applications

ARTIBMP - The server responsible for executing BMP applications

For more information, see UBBCONFIG(5) in Section 5 - File Formats, Data Descriptions, MIBs and System Processes Reference in the Oracle Tuxedo documentation, and Tuxedo ART for IMS server parameters in the Oracle Tuxedo Application Runtime for IMS Reference Guide

6.5 Running an MPP COBOL Program

To run the MPP program DFSIVAP1, open a 3270 terminal and connect to ARTICTL server with the hostname and port defined in UBBCONFIG file, then format the screen and input the transaction code TRAN1, DFSIVAP1.gnt is invoked by ARTIMPP server.

6.6 Running a BMP COBOL Program

To run the BMP program DFSIVAP2, the user need to convert the corresponding JCL on z/OS to shell script by ART Workbench so that it can be run by ART Batch runtime as a JOB. The JOB will invokes a utility DFSRRC00, which starts a specific advertised by ARTIBMP server, which in turn invokes the requested COBOL application. For information, see ART Workbench documentation.