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

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

  1. Convert the C source code using prepro-ims.pl
  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 C applications by submitting a transaction code on 3270 terminal or run a JOB by ART Batch runtime.
    1. Download C source files and dependency header file into local directory on UNIX.

      For example, two C source programs and ims.h are downloaded.

      testmpp1.c is a MPP program

      testbmp1.c is a BMP program

      ims.h is the header file supported in IBM IMS.

    2. Convert source code

      prepro-ims.pl -i source-file -o dest-file [-m yourmakefile]

      The ims.h from mainframe can also be processed by prepro-ims.pl. Lines beginning with “??=” or “#pragma” are commented out.

    3. Set configuration file

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

    Listing 5 imstrans.desc Example

    [imstran]
    name=TRAN3
    response=no
    edit=ULC
    appname=TESTMPP1
    class=1

    Configure LANG in file imsapps.desc, LANG indicates the program to run is COBOL or C type as following:

    Listing 6 imsapps.desc Defining Two Applications

    [imsapp]
    name=TESTMPP1
    type=TP
    LANG=C
    
    [imsapp]
    name=TESTBMP1
    type=BATCH
    LANG=C

    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 program), the prefix of its .psb file can be any name that complies to the naming rule of IMS applications. The .psb files for TESTMPP1 and TESTBMP1 are shown as below. One I/O PCB plus the PCBs defined in .psb are passed to the C program as its parameters when the program is invoked.

    Listing 7 TESTMPP1.psb Examples

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

    Listing 8 TESTBMP1.psb with two Alternate PCBs

    TESTBMP1.psb
    [imspcb]
    type=GSAM
    name=DFSIVD6I
    procopt=G
    
    [imspcb]
    type=GSAM
    name=DFSIVD6O
    procopt=LS
    
    [imspcb]
    type=GSAM
    name=TSTIVD6O
    procopt=LS
  4. Compile source code.

    Modify makefile and run gmake

    Modify makefile by setting ZOSINC=-I/path/containing/ims/header/from/mainframe

    Modify makefile for that one program requiring more than one source files.

    Example:

    testmpp.c will be compiled to libartimstestmpp.so

    testbmp.c will be compiled to libartimstestbmp.so

    The APPNAME in configuration file should be the same as application name converted by preprocessor.

    That is, <filename> corresponds libartims<filename>.so.

  5. Set library search path.

    The environment variable LD_LIBRARY_PATH should be redefined by adding the directory containing these library files in the first of its original list.

    However, LD_LIBRARY_PATH is only for Linux and Solaris. On AIX, LIBPATH should be used instead.

    For example, libartimstestmpp.so and libartimstestbmp.so should be under the LD_LIBRARY_PATH (Linux/Solaris) or LIBPATH(AIX).

7.1 Running an MPP C Program

To run the MPP program testmpp, 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 TRAN3, testmpp is invoked by ARTIMPP server.

7.2 Running a BMP C Program

To run the BMP program testbmp, 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 C application. For information, see ART Workbench documentation.