Developing applications to use the CICS-MQ bridge

A non-CICS® application can communicate with a CICS program or transaction by sending and receiving IBM® MQ messages over the CICS-MQ bridge. The data required by the CICS application is included in request messages, and the CICS-MQ bridge uses reply messages to return the data provided by the CICS application.

The following types of CICS application are suitable for use with the CICS-MQ bridge:
  • CICS programs that are called using the EXEC CICS LINK command, known as DPL programs. The programs must conform to the DPL subset of the CICS API; that is, they must not use CICS terminal or sync point facilities. You can use the CICS-MQ bridge to run a single CICS program, or a set of CICS programs that form a unit of work.
  • CICS transactions that were designed to be run from a 3270 terminal, known as 3270 transactions. The transactions can use Basic Mapping Support (BMS) or terminal control commands. They can be conversational or part of a pseudoconversation. They are permitted to issue sync points.
Typically, more complex application programming is required to run a 3270 transaction through the CICS-MQ bridge, because the non-CICS application must interact with the internal logic and flow of control in the CICS transaction. It is preferable to run a DPL program that contains the business logic of the CICS application. However, some CICS applications are not structured with the business logic of the application separated from the presentation logic, so the CICS-MQ bridge lets you communicate with either type of application.
A non-CICS application starts a CICS application by sending a structured IBM MQ message to the request queue for the CICS-MQ bridge. Any data required by the CICS application can be included in the request message:
  • For DPL programs, the data required is the CICS communication area (COMMAREA) data used by the CICS application. If the CICS application does not require any COMMAREA data, the message data consists only of the name of the DPL program.
  • For 3270 transactions, the data required comprises vectors describing the application data structures (ADSs) used by the CICS application.

The request message typically also includes the IBM MQ CICS information header (the MQCIH structure), which supplies control options for the CICS applications. If you are running a single DPL program with the default transaction code, and the program does not require any authorization, you do not need the MQCIH. In all other cases, and for all 3270 transactions, the MQCIH is required.

The CICS-MQ bridge takes the data that is produced as output CICS application send data back to the non-CICS application in an IBM MQ message that is sent to a reply queue:
  • For DPL programs, the data sent back is the COMMAREA data produced as output by the CICS application.
  • For 3270 transactions, the data sent back comprises vectors describing the application data structures (ADSs) produced as output by the CICS application. The non-CICS application must interpret and respond to these vectors.

For explanations of how the CICS-MQ bridge processes the IBM MQ messages to run single or multiple DPL programs or 3270 transactions, see How CICS DPL programs run under the CICS-WebSphere MQ bridge and How CICS 3270 transactions run under the CICS-WebSphere MQ bridge.

If you are planning to run a 3270 transaction, you might find it helpful to obtain a copy of CICS SupportPac CA1E CICS 3270 Bridge Passthrough to help you analyze the logic of the CICS transaction. The SupportPac enables you to display and capture the inbound and outbound data flows, to study how messages must be structured, and which values to insert into fields in the MQCIH and the vectors.