XML-Enabling IMS Transactions Using HostBridge
February 12, 2009
Greetings fellow professionals on the front lines of CICS, IMS, and zOS integration…
Last year I had the opportunity to spend some time working with the nation’s largest county municipality (the county's population is larger than the populations of 42 states). While they have been a HostBridge customer for some time, I was onsite to help them explore an interesting proof-of-concept (POC) project: using HostBridge to XML-enable an important IMS terminal-oriented transaction. What’s so interesting about this? Well… HostBridge runs under CICS TS.
I won’t devote time to discussing the relative merits of using CICS as a gateway to access IMS. There are arguments on both sides, and in the final analysis, the right decision depends on the overall integration requirements (as well as customer preferences). Suffice it to say this customer has both CICS apps and IMS apps -- and they already have (and like!) HostBridge. Thus, they wanted to explore what they could do with what they already owned. Oh… one more thing. This customer is (rightfully) paranoid about security.
Step 1: Create the HostBridge-to-IMS Pathway
HostBridge runs under CICS. When executing CICS terminal-oriented transactions, HostBridge exploits the Link Bridge Interface (our customers are probably the heaviest users of this CICS TS feature). Obviously, however, executing an IMS transaction requires a different approach! For this POC, we decided to have HostBridge exploit a CICS-based mechanism called FEPI (Front End Programming Interface) to connect CICS and IMS. Using FEPI, a program running under CICS can act as a 3270/LU2 terminal. And using this pathway, HostBridge can execute any IMS terminal-oriented transaction and still do its XML-enablement thing.
As before, I won’t take time to argue the pros/cons of FEPI. I have been on the “con” end of that argument as often as the “pro” end. At the end of the day, I’m a technology pragmatist -- and using FEPI in this situation was very practical. HostBridge has supported FEPI for quite some time. However, this was the first time that I personally put it through the wringer against IMS under such rigorous conditions.
In order to connect CICS and IMS via FEPI, you first must define a VTAM application major node that contains a set of logical unit (LU type 2) definitions. These LUs were assigned very creative names -- FEPI0001 thru FEPInnnn. Within IMS, these VTAM LU names become the “terminal ids.” A terminal id does not have to be explicitly defined to IMS. But, as an additional security measure, terminal ids must be defined to this customer’s IMS application. So before the customer’s IMS application could be executed via HostBridge, FEPI0001-FEPInnnn had to be defined to the application. No other configuration changes were made.
Step 2: Test the HostBridge-to-Application Pathway
The next step of the POC focused on the HostBridge-to-application connection. Configuring CICS, VTAM, and IMS to support FEPI is pretty straightforward. However, writing highly generalized code to interact with arbitrary IMS terminal-oriented transactions is a different matter. As part of the POC, we made the following updates to the customer’s version of HostBridge:
- Installed the most recent version of the HostBridge “FEPI exit programs”; these are driven by CICS/FEPI to handle certain events.
- Installed an updated version of HostBridge program HBR$MAIN to:
- Handle certain exception responses returned by IMS -- specifically, SNA sense code x’0826’ indicating “Function not supported.” IMS returns this sense code when invalid, insufficient, or unexpected input has been received. Personally, I think this particular IMS behavior is odd, bordering on bizarre. But, admittedly, it also reflects a certain degree of technical elegance.
- Enhance the hb_type= directive to allow simple specification of various keyboard actions (e.g., TAB, HOME). We did this to make it easier to interact with the target IMS transaction (a very “TAB centric” app).
These changes were made to: (a) insure that FEPI session initialization/termination and potential error cases were handled in the most robust manner possible, and (b) to make interacting with the IMS-based transactions easier.
Our test scenario was to perform an identical sequence of interactions against the IMS application via a terminal and HostBridge. We would evaluate the XML documents received via HostBridge to ensure they were identical to the results received via a terminal.
The following test scenario was used:
- Connect to IMS
- Invoke the IMS logon transaction (command: /for logon)
- Specify the userid and password (IMS/RACF level security)
- Start MFS support (command: /test mfs); required because we were running in an IMS test region
- Run the IMS transaction to start the customer’s application
- Enter a userid and password to the IMS application (application level security)
- Press PF3 to select a particular inquire transaction
- Enter data in two input fields to indicate which item we want to inquire about
- Review the inquiry output to insure correctness
- Clear the screen (this will exit the application)
- Logoff (command: /rcl).
Distributed applications typically interact with HostBridge through a series of HTTP requests/responses. In our test scenario, each step corresponded to a single HTTP request. In response, HostBridge returned an XML document with the corresponding IMS/application output. The following sequence of HostBridge HTTP requests were use to implement the test scenario (underlined values are placeholders; an “*” is used to indicate the value of the HostBridge session token):http://ip-addr:ip-port/
Note: Our HostBridge Extended (HBX) product features a CICS-based process automation engine that allows many requests to be aggregated into a single service request/response. However, this customer was licensed only for the HostBridge base product.
I’m happy to report that all steps of the test scenario ran correctly (and repeatedly!) through HostBridge -- and with excellent response times. The upshot is that we successfully demonstrated how HostBridge can be used to XML-enable, or service-enable, IMS transactions.
For organizations that use both CICS and IMS applications, we hope this POC highlights some new integration possibilities. Using HostBridge, you can compose a single web service that encapsulates terminal-oriented transactions, business logic, or data from both CICS and IMS applications.
Until next time, we hope you’ll keep HostBridge in mind for Real CICS Integration!