Starting an IMS application called by a JAVA program
We support connectivity to JAVA clients via TCP/IP (IMS Connect emulation).
The following demonstrates the IMS Connect interface in Mainframe Express (MFE) 2.5 SP1.
The following files used in this article are available in 20040601_004.ZIP
PGM1.CBL
Sample IMS/ESA TM application program.
PGM1.PSB
PSB source for PGM1 program.
ITOCC2.CBL
Sample TCP/IP client application.
- Create a new MFE IMS project.
- Add PGM1.CBL and PGM1.PSB to the project and do a build.
- Add a trancode definition. MPP Tran=PGM1, Pgm=PGM1, PSB=PGM1
- From IMS System Properties, select the TM/MFS more panel and specify a TCP Port number for the IMS Connect Server. Default 6000 is okay.
- From an MFE Command prompt in this directory, issue the command:
cobol ITOCC2.CBL dialect(mf) omf(gnt);
- Start debugging the IMS command:
\IMSCONN
(Steps 7, and 8 are optional) - From a browser, enter the URL for the IMS Connect Server. The format of this is:
http://ipname:port#
For example: http://cajb-ced:6000 or http://192.168.1.102:6000
The ip-name or ip-address is from the machine running the IMS Connect Server. The port# is the number defined in step 4 above. - Click on the refresh button to test the http interface.
- From the MFE Command prompt, enter the command: run ITOCC2
- For server name enter your ipname or ipaddress.
- For port#, enter the port#.
- It prompts whether to send a message, type Y and press Enter.
- It prompts for trancode, type PGM1 and press Enter.
- It prompts for a segment count; this is the number of messages segments to send to IMS. Choose any number in the range.
- It then prompts for the size of each message segment. Choose any size in the range.
- At this point, PGM1 should appear in the debugger. This is the mainframe IMS application that was scheduled by IMS Connect. It receives all the message segments, then sends a response segment back to the client.
- The client loops back and prompts for another transaction. Type N and press Enter when you are done.
- To stop the IMS Connect Server, click the Shutdown button on the browser or issue a stop debugging in MFE. IMS Connect beeps as it terminates.
Note: You can issue the command IMSDIAG 220 at the MFE Command prompt to enable tracing of the IMS Connect Server. The Server has to be restarted to pick up this change.
Reference Knowledge Base Document #18874