A RESTful API uses HTTP requests to GET, PUT, POST and DELETE data and one of the hottest topics in the mainframe world of late is the ability of mainframe clients to securely expose mainframe resources for consumption outside the mainframe environment.
In an effort to modernize IMS and make digital transformation pay off, IBM created capabilities that enable you to expose existing IMS transactions for external consumption outside of the mainframe as RESTful services. And, if you haven’t yet thought of taking advantage of the API capability, you haven’t missed the bus yet.
The Three Steps
Let’s look at a simple, yet practical implementation of securely exposing your existing IMS transactions as RESTful APIs. We’re going to cover three different steps:
1. Create an IMS RESTful API. We will take an existing IMS transaction and expose it as a RESTful service. Here, we’re simply trying to create a service to enable RESTful access to IMS transactions through the IMS service provider, also known as the IMS Mobile feature. There are four different components involved in this process:
- IMS Connect. The IMS service provider provides access to IMS transactions through the IMS Transaction Manager, with IMS Connect being the TCP/IP gateway. The transactions can then access IMS DB, Db2 and other external subsystems.
- z/OS Connect Enterprise Edition (zCEE) server. z/OS Connect is a WebSphere Liberty-based server. It houses RESTful services, necessary artifacts and connection properties, and profiles to expose IMS transactions as a RESTful service.
- IBM IMS Enterprise Suite Explorer for Development, popularly called E4D. This is an Eclipse-based tooling and is required to manage, deploy and test IMS RESTful services in z/OS Connect.
- zCEE API toolkit. This is required for creating IMS services and REST APIs to act on those services.
You can refer to the IBM TechDoc
for a detailed, step-by-step guide to creating IMS services and REST APIs, and testing IMS RESTful APIs.
2. Call an IMS RESTful API from z/OS applications. Now that you’ve created and tested an IMS RESTful API, you can call the API from z/OS applications residing on the mainframe. For example, you can have a COBOL application residing on the mainframe that can make RESTful API calls to the IMS RESTful APIs you just created.
I entered a machine part number on the web application and hit the ENTER key, at which point a RESTful API call is made to an existing IMS transaction. IMS does whatever magic it has to do at the backend and sends the transaction response back to the web application frontend client within a matter of seconds. For a visual of this transaction response, see Figure 1. For a visual of what this transaction response looks like on a mobile device, see Figure 2.
The transaction response received from IMS from Step 3
A mobile device screenshot of the transaction response received from IMS from Step 3
Let’s think about this for a moment. As an end user, I don’t need to know how IMS works in the background. I would simply fire a transaction from a modern web-based frontend GUI application and receive the response back within the blink of an eye.
Once the web application tested fine on my local system, I went ahead and deployed it on the cloud. And, with a cloud-native application, you now have the power to talk to IMS from the comfort of your mobile device—anytime, anywhere.
Subhasish Sarkar, who specializes in different IBM Z mainframe technologies, is a senior SQA engineer at BMC Software India Pvt. Ltd.