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.cis a MPP programtestbmp1.cis a BMP programims.his 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 byprepro-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=1Configure 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=CTo run any applications in IMS, one PSB is required. In Tuxedo ART for IMS, PSB macro for an application is mapped to a
.psbconfiguration file. For MPP program, the prefix of its.psbfile should be the application name (i.e.,$appname.psb; for BMP program), the prefix of its.psbfile can be any name that complies to the naming rule of IMS applications. The.psbfiles forTESTMPP1andTESTBMP1are shown as below. One I/O PCB plus the PCBs defined in.psbare 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=noListing 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
gmakeModify makefile by setting
ZOSINC=-I/path/containing/ims/header/from/mainframeModify makefile for that one program requiring more than one source files.
Example:
testmpp.cwill be compiled tolibartimstestmpp.sotestbmp.cwill becompiled to libartimstestbmp.soThe
APPNAMEin 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_PATHshould be redefined by adding the directory containing these library files in the first of its original list.However,
For example,LD_LIBRARY_PATHis only for Linux and Solaris. On AIX,LIBPATHshould be used instead.libartimstestmpp.soandlibartimstestbmp.soshould 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.