Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 2.32 KB

File metadata and controls

32 lines (22 loc) · 2.32 KB

Calling a REST API from IMS using z/OS Connect Enterprise Edition

You can call a REST API from an IMS™ applications by using IBM® z/OS® Connect Enterprise Edition (z/OS Connect EE) V3 as the solution.

Scenario

You have an IMS COBOL application that needs to call a REST API to retrieve the contact information based on a person's last name.

Program flow and architecture

This scenario uses the API requester feature in z/OS Connect EE to handle:

  • The API request from an IMS application
  • Data conversion between byte arrays and XML
  • The API response back to IMS

z/OS Connect EE provides a Build toolkit that lets you generate the required artifacts based on the REST API's Swagger document. The generated files include:

  • The API information file that describes the API name, the API path, exposed API methods and other information that is required to communicate with the communication stub. The communication stub is provided with z/OS Connect EE and must be configured on IMS for communication with the z/OS Connect EE server.
  • The copybooks that contain the language structures of the request and response messages.
  • An API requester archive (.ara) file that needs to be deploy to the z/OS Connect EE server.

flowdiagram

To call the REST API, your IMS application must first include the generated API information file and the request and response message copybooks. You can then specify the content for the request, retrieve the response, and, if an error occurs with the call, identify where the error occurs to help take the appropriate remedial action.

Technology demonstrated

  • z/OS Connect EE V3 : its API requester feature and Build toolkit

You can try out this feature in two ways: