Professional Documents
Culture Documents
John Tilling
CICS Technical Planning & Strategy
IBM UK Labs Hursley Park
Tilling@uk.ibm.com
CICS, MQ and DB2 have always benefited from good integration. The CICS-MQ
adapter, the CICS-MQ Trigger Monitor and the CICS-MQ Bridge are now
included in CICS Transaction Server V3.2 following the approach for inclusion of
the CICS/DB2 adapter in CICS Transaction Server V1. This session will look at
the changed capabilities to the CICS-MQ functions now that they are included in
CICS, give an insight into further updates and requirement areas and provide an
summary and comparison to the CICS-DB2 2 adapter.
Agenda
• The CICS-MQ Adapter
• The CICS-MQ Trigger Monitor
• The CICS-MQ Bridge
• Integration changes in CICS Transaction Server V3.2
• CICS-DB2 Attach summary
• CICS-MQ wishlist
Session 1078 © 2008 IBM Corporation 2
CICS-MQ Interfaces
• Websphere MQ will continue to ship the above components for use with CICS TS
3.1 and below
• Until such time that all releases of CICS TS prior to CICS TS 3.2 are out of service
• Limited enhancements over time. No OTE support.
• Will functionally stabilize
• MQ Level2 and Level3 will continue to service MQ shipped components
Components transferred from WebSphere® MQ: The components to connect CICS and WebSphere
MQ for z/OS have been enhanced and are now integrated with CICS TS V3.2.
The components transferred include the CICS-MQ adapter, the CICS-MQ trigger monitor, and the CICS-
MQ bridge. The enhancements include:
• Exploitation of the CICS Open Transaction Environment (OTE). The components have been made
threadsafe, and are enabled to use CICS open TCBs. Exploitation of OTE will benefit threadsafe
applications using WebSphere MQ. For multiple WebSphere MQ requests, TCB switching can be avoided,
resulting in a saving of CPU and an increase in overall throughput, because applications can now run on
multiple open TCBs and avoid bottlenecking.
• Improved diagnostics, including use of CICS facilities for system trace, dump formatting, and messages
• Improved statistical information, including the use of connections between CICS and WebSphere MQ,
and the type and success of calls made. This information has also been made available within the
CICSPlex SM Web User Interface.
Note that the CICS-MQ adapter and CICS-MQ trigger monitor shipped in CICS TS must be used in place
of the components shipped in WebSphere MQ, and they can be used with all supported levels of
WebSphere MQ for z/OS. The CICS-MQ bridge shipped in CICS TS is for use with WebSphere MQ for
z/OS V6.0, or later. When using WebSphere MQ for z/OS V5.3.1, CICS continues to require the CICS-MQ
bridge shipped in WebSphere MQ for z/OS V5.3.1, and the WebSphere MQ PTF for APAR PK39200 must
be applied. (The CICS shipped bridge code will detect that WebSphere MQ for z/OS V5.3.1 is being used
and will transfer control to the WMQ shipped bridge). See also the statement Components transferred from
WebSphere MQ in the Compatibility section.
What is the CICS-MQ Adapter ?
WebSphere MQ
CICS Transaction Server V3.2 Queue manager
Application
API Stub CKTI
Task-initiator
4
Sync Point
Task Related
Message Manager
User Exit
Task
Management
CKQC
Termination Connection Manager
Control Transaction
WebSphere MQ software and CICS Transaction Server run at separate address spaces within IBM
OS/390® or IBM z/OS systems, and they communicate using components provided by both products.
CICS Transaction Server has a task related user exit (TRUE) interface that allows it to forward executed
information to another subsystem.The CICS-MQ Adapter is a set of components that you can run within a
CICS region — to allow it to create a connection through a TRUE interface to a queue manager. It also
allows application programs running within CICS Transaction Server to use the connection to send and
receive messages.
A CICS region can use a single adapter to connect to one queue manager. And several CICS regions can
share a workload through a common queue manager. The adapter provides CICS Transaction Server with
a control transaction, or CKQC, to start, stop and customize the interface between CICS Transaction
Server and the queue manager. You can run this transaction from a program list table (PLT) program
during the initialization of the CICS region or from a 3270 terminal once the region has started.
A task-initiator transaction, or CKTI, can monitor a specific message queue across the connection to the
queue manager. Several CKTI commands can monitor a set of queues, although no more than one
instance can be used with a particular queue from within a single CICS region. Each instance of CKTI is
defined, started and stopped using the CKQC adapter-controller transaction. When one or more messages
arrive in a message queue to meet a particular trigger condition, the CKTI transaction detects this event.
You can configure the CKTI to start a separate named CICS transaction to process the message(s) on this
queue. Having started a new instance of this named transaction, CKTI then continues to monitor the queue
for other trigger events. The named transaction started by CKTI is, in effect, the same as the one described
in the first scenario. The transaction contains the stub, which allows it to access the CICS adapter through
the TRUE interface and typically contains commands to retrieve one or more messages from the queue. It
may also contain instructions to put messages onto other queues or carry out any of the functions
supported by standard CICS APIs.
CICS-MQ Adapter Considerations
The CICS adapter connects a CICS subsystem to an WMQ queue manager
•Enables CICS application programs to use the MQI
•Provides for control and management of the adapter & queue manager connection
Managing Connectivity
• CICS can be enabled to connect to MQ automatically
• A CICS system connects to only5 one queue manager at a time
• CICS and WebSphere MQ are independent
• Independently started and stopped
• Connections can be establish or terminated at any time
In addition to providing access to the MQI calls, the adapter provides:
• A trigger monitor (or task initiator) program that can start programs
automatically when certain trigger conditions on a queue are met. The
trigger monitor shipped will work with all supported releases of Websphere
MQ
• An API-crossing exit that can be invoked before and after each MQI call.
In a CICSPlex environment each CICS address space has its own attachment to the queue manager
subsystem.
CICS-MQ Adapter - MQI SUPPORT
For MQI support, CSQCSTUB the API stub program is linkedited with the
application
Application Transaction Integrity :
• Syncpointing under control of CICS recovery manager is supported.
Application Security : 6
• WebSphere MQ resource level checking via an ESM such as RACF.
When CICS is connected to WebSphere MQ and the queue manager terminates, the CICS
adapter tries to issue a connect request ten seconds after the stoppage has been detected.
This request uses the same connect parameters that were used in the previous connect
request. If the queue manager has not been restarted within the ten seconds, the connect
request is deferred until the queue manager is restarted later.
The CKQC transaction provides control for the CICS adapter connections
• Panel or command line interface
Control Capabilities to:
• Start or stop a connection to a queue manager.
• Display the current status of a connection and the statistics associated
with that connection.
• Modify the current connection. 7
• reset the connection statistics
• enable or disable the API-crossing exit.
• Start or stop an instance of the Trigger monitor CKTI.
• Display details of the current instances of CKTI.
• Display details of the CICS tasks currently using the adapter.
(Note: Statistics are now subject to reset via standard CICS stats mechanisms as well)
CICS-MQ Adapter – CKAM Alert Monitor (DFHMQMON)
The alert monitor transaction, CKAM, handles unscheduled events known as pending
events that occur as a result of connect requests to instances of WebSphere MQ.
INITPARM=(DFHMQPRM=’SN=CSQ1,IQ=CICS01.INITQ’)
Where:
SN The subsystem name. This must be the name of a queue manager.
IQ The name of the default initiation queue.
If IQ init parm is blank, and you do not specify an initiation queue name by any other method, an instance
of CKTI is not started when the CICS adapter connects to the queue manager.
A typical use of PLTPI programs is for overriding the INITPARM settings if your CICS adapter initiation
queue name is too long to be supported via the INITPARM statement.
CKQC
From the initial panel, you first select an item from the menu bar at the top of the panel, and then select an
action from one of the pull-down menus. In the displayed panel or secondary window, you can then type
new values in the fields, as required.
CICS-MQ Trigger monitor CKTI
• Task initiator CKTI is a CICS transaction that starts a CICS transaction when a
WMQ trigger message is read.
• A Trigger message may arise from a message put to
• a specific initiation queue.
• an application message queue, if the trigger conditions are met.
Initiation Queues
Exec CICS Start Transid CKTI
CKTI
Task-initiator Trigger
Message
Task-initiator MQTM
11 Message
Network
Structure Queue
Application Exec CICS Manager Transport
API Stub Retrieve RTRANSID
Trigger
Task Related Condition
MQI User Exit
Application Queues
You need to start one instance of CKTI for each initiation queue. CKTI passes the MQTM structure of the
trigger message to the program that it starts by EXEC CICS START TRANSID. The started program gets
this information by using the EXEC CICS RETRIEVE command. A program can use the EXEC CICS
RETRIEVE command with the RTRANSID option to determine how the program was started; if the value
returned is CKTI, the program was started by the CICS-WebSphere MQ trigger monitor.
The CICS-MQ DPL Bridge
• The bridge can be used by a CICS program that is invoked using the EXEC
CICS LINK command.
• It must conform to the DPL subset of the CICS API, that is, it must not use
CICS terminal or syncpoint facilities.
• Other control information may be in a MQCIH header
• unit-of-work information for a sequence of DPL requests
13
Monitor
Request Queue
Exec CICS
Start Transaction
Business Link 14 MQGET request
DPL Bridge
Logic
Transaction MQPUT request Transmission Queue
Program Return
Network
Queue
Manager Transport
The following takes each step in turn, and explains what takes place:
1. A message, with a request to run a CICS program, is put on the request queue.
2. The bridge monitor task, which is constantly browsing the queue, recognizes that a ‘start unit of work’ message is waiting
(CorrelId=MQCI_NEW_SESSION).
3. Relevant authentication checks are made, and a CICS DPL bridge task is started with the appropriate authority, with a particular
userid (depending on the options used to start the bridge monitor).
4. The CICS DPL bridge task removes the message from the request queue.
5. The CICS DPL bridge task builds a COMMAREA from the data in the message and issues an EXEC CICS LINK for the program
requested in the message.
6. The program returns the response in the COMMAREA used by the request.
7. The CICS DPL bridge task reads the COMMAREA, creates a message, and puts it on the reply-to queue specified in the request
message. All response messages (normal and error, requests and replies) are put to the reply-to queue with default context.
8. The user transaction ends or requests more input. If this is the last flow in the pseudo conversation the transaction ends. If it is
not the last message, the transaction waits until the next message is received or the specified timeout interval expires. A unit of work
can be just a single user program, or it can be multiple user programs.
There is no limit to the number of messages you can send to make up a unit of work. In this scenario, a unit of work made up of
many messages works in the same way, with the exception that the bridge task waits for the next request message in the final step
unless it is the last message in the unit of work.
You must start a bridge-monitoring transaction (CKBR) to look for messages arriving on a particular queue. Several monitoring
transactions can run concurrently to manage a set of queues in this way. When the message arrives, the monitoring transaction
detects it and starts a bridge DPL transaction to process the message. The monitoring transaction continues to look for other
messages arriving on the queue. You can set up the bridge DPL transaction to run requests using a system user ID or the user ID of
the requester.
The DPL bridge task reads the message from the queue. From within the message, the task finds the name of a CICS application
program, any input data it requires and, optionally, the name of a message queue to send a response to. Next, the DPL bridge
transaction sets up a COMMAREA containing the input data and links to the named program, returning any output COMMAREA to
the reply queue after the program has ended. The WebSphere MQ client application can use this mechanism either synchronously
or asynchronously. It can wait for a response by monitoring a particular queue, or it may send a message and continue processing
other transactions or even terminate without waiting for CICS Transaction Server to process the request. If the client runs on the
same system as CICS Transaction Server, it can monitor the transmission queue for a response. If it is remote to CICS Transaction
Server, the client can use WebSphere MQ to route the response message from the transmission queue to one defined to its local
queue manager.
Each DPL request executes in isolation, and no state is preserved in CICS to tie up a series of requests that a client might make.
So, if the client calls CICS Transaction Server more than once, each piece of work is treated separately because the server doesn’t
retain any information to tie them together. The WebSphere MQ monitoring transaction and DPL bridge transaction run within the
same CICS region. The program targeted by the DPL request can be made eligible for routing to another CICS region. All to help
balance the workload more effectively.
The CICS MQ 3270 Bridge
Monitor
Request Queue
Exec CICS
Start Transaction
16 MQGET request
Bridge
Transaction MQPUT request Transmission Queue
Receive
3270
Bridge Exit Network
Send Queue
Transaction Manager Transport
The CICS-MQ 3270 Bridge enables you to wrap terminal oriented that were controlled by 3270-connected
terminals with WebSphere MQ messages, without having to rewrite,recompile, or re-link them.
The following takes each step in turn, and explains what takes place:
1. A message, with a request to run a CICS transaction, is put on the request queue.
2. The CICS-MQ bridge monitor task, which is constantly browsing the queue, recognizes that a ‘start unit
of work’ message is waiting (CorrelId=MQCI_NEW_SESSION).
3. Relevant authentication checks are made, and a CICS 3270 bridge task is started with the appropriate
authority, with a particular userid (depending on the options used to start the bridge monitor).
4. The CICS-MQ bridge removes the message from the queue and changes task to run a user transaction.
5. Vectors in the message provide data to answer all terminal-related input EXEC CICS requests in the
transaction.
6. Terminal-related output EXEC CICS requests result in output vectors being built.
7. The CICS-MQ bridge builds all the output vectors into a single message and puts this on the reply-to
queue.
8. The CICS 3270 bridge task ends. If this is the last flow in the transaction then the transaction ends, if it is
not the last message, the transaction waits until the next message is received or the specified timeout
interval expires.
CICS-MQ CICS TS V3.2 Integration –
name changes
• Transferred modules are renamed from CSQCxxxx to DFHMQxxx
• Exceptions:
• API crossing exit CSQCAPX.
• Source supplied as CSQCAPX unchanged in SDFHSAMP
• API stub is DFHMQSTB but with alias CSQCSTUB and all other aliases currently
supported, eg CSQCGET, CSQCPUT…..
17
• Stub is shipped in SDFHLOAD and SDFHAUTH
• No recompile and no re-linkedit of applications is required
• CICS supplies adapter, trigger monitor & bridge definitions in CSD group
DFHMQ
• DFHMQ group is part of list DFHLIST
• Program names will be DFHMQxxx apart from crossing exit, stub aliases and aliases for
those programs that can be EXEC CICS LINKed to by user applications
• CKxx transaction names remain the same but refer to DFHMQxxx programs
18
• Users will need to remove existing groups CSQCAT1 and CSQCKB
containing CSQCxxxx definitions from the CSD (unless they are sharing
the CSD)
• Websphere MQ are shipping PK39200 on V531 and PK42616 on V6 to disallow use of
MQ shipped Attach with CICS TS 3.2 and above.
• Produces message CSQC330E. A Technote is already provided on the subject
• TRACE
• EXEC CICS ENTER TRACENUM previously used
• Required master and user trace flags to be on for non exception traces
• DUMP
• CICS dump domain services used.
• CICS IPCS verbexit enhanced
• New MQ keyword to dump out CICS-MQ Attach control blocks
• Formatting very similar to that provided for CICS-DB2 Attach
• CSD groups CSQCAT1 and CSQCKB are NOT installed, and that CSD group DFHMQ is
installed. Likewise for CPSM BAS ensure old definitions are not installed.
• The following WebSphere MQ libraries are AFTER CICS libraries in the CICS STEPLIB and
DFHRPL concatenations. 22
• SCSQANLx * (where x is the language letter of your national language)
• SCSQCICS *
• SCSQLOAD
• SCSQAUTH
* The SCSQANLx and SCSQCICS libraries are only required if you wish to run the WebSphere MQ supplied samples, or
you are running WebSphere MQ V531 and wish to use the WebSphere MQ Bridge. Otherwise they can be removed from
the CICS JCL.
INITPARM=(CSQCPARM='SN=xxxx,TN=yyy,IQ=zzzzz')
to
INITPARM=(DFHMQPRM='SN=xxxx,IQ=zzzzz')
• Support for the DB2 V7 JDBC 2.0 driver and DB2 V7 and V8 JDBC
Universal Driver. Now also DB2 9 driver
25
• CICS-DB2 Attach with DB2 V6 upwards exploits an RMI
enhancement to allow purge across the RMI
Note the above enhancements are the subject of various customer requirements submitted to IBM. They
are no commitments to provide this functionaility at this time, but could form the basis of enhancements of
over a number of future releases.