To allow applications running in different environments to send and receive messages through a message queuing network, WebSphere MQ for z/OS provides an adapter for each of the environments it supports. These adapters are the interface between application programs and WebSphere MQ for z/OS subsystems. They allow the programs to use the MQI.
The batch adapter provides access to WebSphere MQ for z/OS resources for programs running in:
The programs must not be in cross-memory mode.
Connections between application programs and WebSphere MQ for z/OS are at the task level. The adapter provides a single connection thread from an application task control block (TCB) to WebSphere MQ for z/OS.
The adapter supports a single-phase commit protocol for changes made to resources owned by WebSphere MQ for z/OS; it does not support multiphase-commit protocols.
The transaction management and recoverable resource manager services (RRS) adapter:
WebSphere MQ for z/OS provides two RRS batch adapters:
It is possible to migrate existing Batch/TSO WebSphere MQ applications to exploit RRS coordination with few or no changes. If you link-edit your WebSphere MQ application with the CSQBRRSI adapter, MQCMIT and MQBACK syncpoint your unit of work across WebSphere MQ and all other RRS-enabled resource managers. If you link-edit your WebSphere MQ application with the CSQBRSTB adapter you must change MQCMIT and MQBACK to SRRCMIT and SRRBACK respectively. The latter approach may be preferable as it clearly indicates that the syncpoint is not restricted to WebSphere MQ resources only.
Note to users |
---|
If you are using the CICS adapter from a WebSphere MQ for z/OS system, ensure that CICS is able to obtain sufficient storage to accommodate messages up to 100 MB long. |
A CICS system can have only one connection to a WebSphere MQ for z/OS queue manager, and this connection is managed by the WebSphere MQ for z/OS CICS adapter. The CICS adapter provides access to WebSphere MQ for z/OS resources for CICS programs.
In addition to providing access to the MQI calls, the adapter provides:
This section describes how the CICS adapter optimizes the performance of a CICS to WebSphere MQ connection.
There are a number of factors to be taken into consideration when performance is critical:
Therefore, use the WAIT option with care.
If there are multiple messages to be put, MQOPEN-MQPUT...MQPUT-MQCLOSE should be used.
The EXEC CICS RETURN call accommodates all the work needed for syncpointing and task termination into one flow to WebSphere MQ instead of the two separate flows used when explicit syncpointing is used.
You can use the CKQC transaction to display statistics for the current connection.
The adapter supports a two-phase commit protocol for changes made to resources owned by WebSphere MQ for z/OS, with CICS acting as the syncpoint coordinator.
The CICS adapter also supplies facilities (for use by system programmers and administrators) for managing the CICS-WebSphere MQ for z/OS connection, and for collecting task and connection statistics. These facilities are described in the WebSphere MQ for z/OS System Administration Guide.
Application programmers can use trace points related to the MQI calls--for example, CSQCGMGD (GET Message Data)--for debugging CICS application programs. System programmers can use trace points related to system events, such as recovery and task switching, for diagnosing system-related problems. For full details of trace points in the CICS adapter, see the WebSphere MQ for z/OS Problem Determination Guide.
Some trace data addresses are passed by applications. If the address of the trace data is in the private storage area of the CICS region, the contents of the area are traced when necessary. For example, this would be done for the trace entries CSQCGMGD (GET Message Data) or CSQCPMGD (PUT Message Data). If the address is not in the private storage area, message CSQC416I is written to the CICS trace--this contains the address in error.
This section describes some of the things you must consider with regard to CICS AEY9 and QLOP abends. For information about all other abends, see the WebSphere MQ for z/OS Messages and Codes.
A transaction does not abend with a CICS AEY9 code if it issues an MQI call before the adapter is enabled. Instead, it receives return code MQCC_FAILED and reason code MQRC_ADAPTER_NOT_AVAILABLE.
For more information about CICS AEY9 abends, see the CICS Messages and Codes.
Tasks abend with the abend code QLOP if a second MQI call is made after a call has been returned with completion code MQCC_FAILED and one of these reason codes:
This runaway mechanism can be activated only after the adapter has been enabled once. Before the adapter has been enabled, such a task will loop with reason code set to MQRC_ADAPTER_NOT_AVAILABLE. To avoid this, ensure that your applications respond to the above reason codes either by terminating abnormally or by issuing an EXEC CICS SYNCPOINT ROLLBACK and terminating normally.
If the application does not terminate at this point, it might not issue any further WebSphere MQ calls even if the connection between WebSphere MQ and CICS is re-established. Once WebSphere MQ is reconnected to CICS, new transactions can use MQI calls as before.
You can use the CICS execution diagnostic facility (CEDF) to monitor applications that use the CICS adapter. For details of how to use CEDF, see the CICS Application Programming Guide.
CEDF uses standard formatting to display MQI calls.
See WebSphere MQ for z/OS Problem Determination Guide for examples of the output produced by this facility.
Note to users |
---|
If you are using the IMS adapter from a WebSphere MQ for z/OS system, ensure that IMS is able to obtain sufficient storage to accommodate messages up to 100 MB long. |
The IMS adapter provides access to WebSphere MQ for z/OS resources for
To use these resources, the programs must be running in task (TCB) mode and problem state; they must not be in cross-memory mode or access-register mode.
The adapter provides a connection thread from an application task control block (TCB) to WebSphere MQ. The adapter supports a two-phase commit protocol for changes made to resources owned by WebSphere MQ for z/OS, with IMS acting as the syncpoint coordinator.
The adapter also provides a trigger monitor program that can start programs automatically when certain trigger conditions on a queue are met. For more information, see Chapter 14, Starting WebSphere MQ applications using triggers.
If you are writing batch DL/I programs, follow the guidance given in this book for z/OS batch programs.