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:
- Convert the C source code using
prepro-ims.pl
- Customize configurations files of Tuxedo ART for IMS according to IMS Macros on z/OS,
- 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.
- 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 programtestbmp1.c
is a BMP programims.h
is the header file supported in IBM IMS. - 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. - 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 forTESTMPP1
andTESTBMP1
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
- Download C source files and dependency header file into local directory on UNIX.
- 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 tolibartimstestmpp.so
testbmp.c
will becompiled 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
. - 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,
For example,LD_LIBRARY_PATH
is only for Linux and Solaris. On AIX,LIBPATH
should be used instead.libartimstestmpp.so
andlibartimstestbmp.so
should be under theLD_LIBRARY_PATH
(Linux/Solaris) orLIBPATH(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.