MAINFRAME > Administrator > IMS

Using IMS Application Interface Block in COBOL for Synchronous Callout

As Internet technology evolves and business requirements gain complexity with speed, businesses are calling for better exchanges and integration of data and services. It has become a common scenario where IMS applications are required to access data or services from sources outside of IMS, z/OS or the company intranet to complete a task.

With the IMS callout solutions, IMS applications are able to send outbound messages—through Open Transaction Manager Access (OTMA) and IMS Connect—to request data or services from an external application, such as a Web service, a message-driven bean (MDB) or an Enterprise JavaBeans (EJB) application. The request for external data or services is called an IMS callout request. The application that issues a callout request is an IMS callout application.

An IMS callout application can optionally receive responses back in the same or a different application. An IMS callout application can handle the response in two ways—asynchronously or synchronously. If the callout application frees up the dependent region and doesn’t wait for a response after the request is issued, it’s called an asynchronous callout request. If it waits for that response, it’s a synchronous callout request.

In many business cases, synchronous callout requests are required because the callout application must receive either some data back, or an acknowledgement of successful delivery, in order to continue with subsequent operations. To issue a synchronous callout request, an IMS application program can use the IMS Call (ICAL) DL/I call.

Application Interface Block

Each ICAL DL/I call in an IMS application program must specify an application interface block (AIB) to communicate with IMS with the detailed instructions for calling out. Some of the information in the AIB will be passed to an IMS Connect client, such as IMS Enterprise Suite SOAP Gateway or WebSphere DataPower Appliance, for callout message formatting. Each AIB in a COBOL application consists of several AIB fields and must be defined in working storage, on a full-word boundary, and initialized according to the order and byte length of the AIB field. Using the AIB correctly is the first step to making an IMS callout request for a COBOL application.

Two of the common fields in the AIB are the specifications of the request destination and a timeout value. The ICAL call must be provided with these AIB fields in order to determine where to send the request, and if the default timeout value isn’t appropriate, how long it must wait for the response.

The information specified in the AIB is the first level of instructions for calling out. The second level is defined in the OTMA destination descriptor in the IMS DFSYDTx procedure library member. The AIB must specify the name of an OTMA destination descriptor so IMS can locate the specified OTMA descriptor entry to obtain the address of the callout request, as shown in Figure 1.

If the AIB doesn’t have the valid information specified, the callout request will be rejected immediately. The return code, reason code and extended reason code fields inside the AIB explain the result of the callout request.

Mei Xiu Li is an IMS quality analyst with IBM. She can be contacted at

Jack Yuan is a senior software engineer for IMS development. He can be contacted at

Yee-Rong Lai is a key information developer for the IMS SOA solution suite at the IBM Silicon Valley lab.

comments powered by Disqus



2019 Solutions Edition

A Comprehensive Online Buyer's Guide to Solutions, Services and Education.

Bringing IMS and SOA Together With IMS Connect

New requirements for IMS Connect functionality could make implementing an SOA environment with IMS easier and more flexible.

Celebrating 40 Successful Years

IMS version 10 supports synchronous and asynchronous callout

IBM Systems Magazine Subscribe Box Read Now Link Subscribe Now Link iPad App Google Play Store
Mainframe News Sign Up Today! Past News Letters