Calling a Web Service From the Mainframe
How To| by Jerry Rackley

HostBridge pioneered the use of JavaScript on the mainframe. As a result, its reputation is now firmly established as the company that helps enterprises create CICS web services. Enterprises are still learning that the fastest, most robust means of integrating legacy CICS applications – or modernizing them – is through creating CICS web services. They are easy to develop, fast to deploy and don’t do any screen-scraping. HostBridge has resources to help show how to do this and case studies that describe the benefits.

For most of the integration or modernization efforts that we help clients complete, it is a cloud, web or mobile application that needs to call a CICS web service. Sometimes, however, it is the mainframe that needs to call a web service to retrieve data from other systems. With HostBridge, it’s really straightforward to make an outbound call to an external web service.

Using the HostBridge JavaScript Engine (HB.js), the mainframe can easily invoke an external web service. Examples include Microsoft SQL server, Oracle Application Server or one of the tens of thousands of web services available on the internet that provide information like zip code verification, stock market prices or weather data.

HOSTBRIDGE ENABLES CREATION OF CICS WEB SERVICES, OR CALLING EXTERNAL WEB SERVICES.

Calling an External Web Service from the Mainframe

The steps for making an outbound call to a web service from the mainframe are:

  1. Ensure your host has access to the outside world. In many instances the host is firewalled off since the people who manage the network don’t expect the host to make outbound calls. It’s usually protected and can’t get out to the outside world. You have to make sure that your host can make an outbound network call to the resources you want to get.
  2. Write the code. Using HB.js is very straight forward with a shallow learning curve. Linking to HostBridge out of a COBOL program or even running a transaction directly in HostBridge to make the outbound call is very easy to do.

To make calling external web services from the mainframe even simpler, HostBridge can provide sample code and advice on using it. Just contact the support team at HostBridge for more details.  You can also visit the HostBridge support Wiki to access all documentation.

A question we commonly get about calling external web services from the mainframe is: do you support SSL? Yes, HostBridge does support SSL. In fact, HostBridge supports everything IBM does for security, including RACF or ACF2, depending on how your environment is set up to secure outbound calls.

The Bottom Line

It’s really easier than most people think to call an external web service from your CICS applications, and we’ll help you get started. Just contact us using the form below:

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.