The IMS adapter

The IMS adapter is an interface between IMS application programs and an IBM MQ subsystem.

The IBM MQ adapters enable different application environments to send and receive messages through a message queuing network. The IMS adapter is the interface between IMS application programs and an IBM MQ subsystem. It makes it possible for IMS application programs to use the MQI.

The IMS adapter receives and interprets requests for access to IBM MQ using the External Subsystem Attach Facility (ESAF) provided by IMS. This facility is described in the IMS Customization Guide. Usually, IMS connects to IBM MQ automatically without operator intervention.

The IMS adapter provides access to IBM MQ resources for programs running in the following modes or states:

  • Task (TCB) mode
  • Problem state
  • Non-cross-memory mode
  • Non-access register mode

The adapter provides a connection thread from an application task control block (TCB) to IBM MQ.

The adapter supports a two-phase commit protocol for changes made to resources owned by IBM MQ with IMS acting as the syncpoint coordinator. Conversations where IMS is not the syncpoint coordinator, for example APPC- protected (SYNCLVL=SYNCPT) conversations, are not supported by the IMS adapter.

The adapter also provides a trigger monitor transaction (CSQQTRMN). This is described in The IMS trigger monitor.

We can use IBM MQ with the IMS Extended Recovery Facility (XRF) to aid recovery from a IMS error. For more information about XRF, see the IMS Administration Guide: System manual.


Use the adapter

The application programs and the IMS adapter run in the same address space. The queue manager is separate, in its own address space.

We must link-edit each program that issues one or more MQI calls to a suitable IMS language interface module, and, unless it uses dynamic MQI calls, the IBM MQ-supplied API stub program, CSQQSTUB. When the application issues an MQI call, the stub transfers control to the adapter through the IMS external subsystem interface, which manages the processing of the request by the message queue manager.


System administration and operation with IMS

An authorized IMS terminal operator can issue IMS commands to control and monitor the connection to IBM MQ. However, the IMS terminal operator has no control over the IBM MQ address space. For example, the operator cannot shut down IBM MQ from an IMS address space.


Restrictions

The following IBM MQ API calls are not supported within an application using the IMS adapter:


The IMS trigger monitor

The IMS trigger monitor ( CSQQTRMN ) is an IBM MQ-supplied IMS application that starts an IMS transaction when an IBM MQ event occurs, for example, when a message is put onto a specific queue.

    How it works

    When a message is put onto an application message queue, a trigger is generated if the trigger conditions are met. The queue manager then writes a message (containing some user-defined data), known as a trigger message, to the initiation queue that has been specified for that message queue. In an IMS environment, we can start an instance of CSQQTRMN to monitor an initiation queue and to retrieve the trigger messages from it as they arrive. Typically, CSQQTRMN schedules another IMS transaction by an INSERT (ISRT) to the IMS message queue. The started IMS application reads the message from the application message queue and then processes it. CSQQTRMN must run as a non-message BMP.

    Each copy of CSQQTRMN services a single initiation queue. When it has started, the trigger monitor runs until IBM MQ or IMS ends.

    The APPLCTN macro for CSQQTRMN must specify SCHDTYP=PARALLEL.

    Because the trigger monitor is a batch-oriented BMP, IMS transactions that are started by the trigger monitor contain the following:

    • Blanks in the LTERM field of the IOPCB
    • The PSB name of the trigger monitor BMP in the Userid field of the IOPCB

    If the target IMS transaction is protected by Security Server (previously known as RACF ), you might need to define CSQQTRMN as a user ID to Security Server.

Parent topic: IBM MQ and IMS