Try a Live CICS API Now
How To | Hybrid IT | Modernization| by Jerry Rackley
How well does an API strategy work for modernizing or making CICS applications participate in the hybrid cloud? Find out right now by testing it from your browser. You can invoke a real, live CICS API simply by clicking on this URL:

After clicking the demo link, you’ll see something like this on your screen:

JSON output of a CICS transaction invoked via an API.

This browser screen contains the JSON output from an API call to the HostBridge mainframe where our demo CICS Trader application runs. Trader is a screen-based (3270), BMS share trading CICS demonstration application. The Trader screens look like this:

CICS Trader application 3270 screens.

What Happens When You Invoke a CICS API

By entering that URL in your browser, you sent an HTTP request to the Trader API written with the HostBridge JavaScript Engine (HB.js). HB.js and the APIs you create with it run inside of CICS. Here’s what happens behind the scenes when the HB.js Trader API is invoked:
  1. The API invokes the Trader CICS application running on our mainframe.
  2. The API navigates through 16 Trader screens to get all the trading data for the four companies in the demo. The data is retrieved without doing any screen scraping.
  3. The API returns the results of the transaction sequence in the form of JSON. HB.js APIs also support XML and other output formats.
The entire 16-screen transaction sequence ran on our mainframe in about 250 milliseconds. Any other delay you experience comes from network between you and our mainframe. This quick demo shows how easy it is to use APIs to make mainframe CICS logic and data available. You can also see how fast it is. A single request invoked and ran the API which orchestrated all screen navigation and returned a single response. Using APIs is a easy, fast, reliable, high-performing way to let the hybrid cloud, RPA bots, Excel macros, or anything else to interact with your CICS applications. So how easy is it to create a CICS API?

How to Write CICS Modernization or Integration APIs

Using HB.js and the Eclipse plug-in make it easy to write these APIs. Using the Eclipse editor, we can connect to the mainframe and write an API using JavaScript in realtime. Eclipse easily communicates with your mainframe via a HostBridge-provided plugin. You can write a legitimate API in HB.js similar to the example code shown here:

Sample HB.js code for creating a CICS API.

A simple right mouse click in the editor and choosing ‘Execute’ sends this HB.js API script to the host, for syntax checking and execution inside of CICS. To deploy this API for use requires a simple right mouse click and choosing ‘Make’ which compiles and saves this API, making it available to invoke by your hybrid cloud applications, automations, Excel macros, or any other program that needs CICS logic or data.

Take the Next Step

To learn more about using HB.js to develop and deploy your own CICS APIs, simply reach out to us using the contact information found at the bottom of this page.  
I agree to receive commercial messages from Broadcom. I understand my personal data is processed according to Broadcom's Privacy Policy and I may unsubscribe from emailed communications at any time.