IBM® WebSphere® Business Events can help businesses detect, evaluate, and respond to events generated by various components of their systems. It serves as the event management layer in the IT infrastructure. For more information about WebSphere Business Events, see Resources at the bottom of the article.
IBM CICS® is used by many businesses worldwide to run their applications on z/OS. A new feature in CICS Transaction Server V4.1 (hereafter called CICS TS) generates events in WebSphere Business Events XML format. For information on two IBM Redbooks that describe this feature, see Resources.
When CICS TS produces an event in WebSphere Business Events XML format, you can configure it to write the XML data to a WebSphere MQ queue. You are then required to configure a technology connector as a started task to read the message and publish it to a topic on the WebSphere Business Events server. For details on this approach, see Resources. This article describes an alternative approach that does away with the requirement to set up this separate started task.
This article evolved from a demo of CICS sending WebSphere Business Events XML messages to a WebSphere Business Events V7 server on z/OS. The documented method of setting up a started task seemed complex compared to the approach described in this article, which can be used to send event messages generated by CICS to a WebSphere Business Events V7 server on any supported operating system.
Overview of alternative approach
Figure 1. Alternative approach

Here is the sequence of events in the alternative approach:
- CICS detects that an event has occurred, collects the data, and writes it in WebSphere Business Events XML format to a queue.
- The queue is defined as a remote queue on the WebSphere MQ queue manager, and when the message is written, it ends up on a transmission queue.
- The queue manager sends the message to a destination on the SI Bus on the WebSphere Business Events server.
- A custom application on the WebSphere Business Events server GETs the message from the destination and publishes it to the topic.
- The WebSphere Business Events application processes the event message.
If you have WebSphere ESB or WebSphere Process Server, you can develop a mediation flow to perform the function that the custom application is doing. This approach requires:
- The custom application
- Channel definitions between the WebSphere MQ queue manager and the SI Bus in the WebSphere Business Events server
- Resource definitions in the WebSphere Business Events server
- Resource definitions in the WebSphere queue manger on z/OS
You can download the custom application at the bottom of the article. The downloadable zip file contains mqToWbeProxy.zip and MQ-to-WBE.ear:
mqToWbeProxy.zip is a project interchange file that you can import into Rational Application Developer. It contains the application source code.
MQ-to-WBE.ear can be deployed on the WebSphere Business Events server. The application runs as a message-driven bean and the application code is straightforward. When a message arrives at the destination, the WebSphere Business Events server creates an instance of the ProxyMQEventMsgToWbeTopic class, and passes the message to it. The onMessage method in this class is invoked, with the message passed to it. The application then creates a connection to the Topic Connection Factory and publishes the message to the topic.
This application has two logical resources defined to it. One is a resource to be mapped to the WebSphere Business Events Topic Connection Factory, as shown in Figure 2:
Figure 2. Topic Connection Factory logical resource

The second resource is mapped to the WebSphere Business Events event topic, as shown in Figure 3:
Figure 3. Topic logical resource

A WebSphere Business Events server will already have resources defined to match up with the above logical resource references.
During deployment, when you get to the "Map resource references to resources" step, set the JNDI name for each of these resources by clicking Browse in the column "Target Resource JNDI Name":
Figure 4. Mapping logical topic resource to actual resource

A window opens showing all defined resources of type Topic. Select the entry with the JNDI name jms/EventTopic. The Topic Connection Factory resource will be displayed:
Figure 5. Mapping logical TopicConnectionFactory resource to actual resource

Click Browse in the column "Target Resource JNDI Name." A window opens showing all defined resources of type TopicConnectionFactory. Select the entry with the JNDI name ms/WbeTopicConnectionFactory, then complete the deployment of the EAR file in the normal way and save the changes.
WebSphere resources required for WebSphere MQ to WebSphere Business Events proxy application
Define the following WebSphere resources for the WebSphere MQ to WebSphere Business Events proxy application:
- A destination to store the messages sent from the WebSphere MQ queue manager
- A JMS queue definition to reference the destination
- An activation specification
In the WebSphere administrative GUI, expand Service integration => Buses, click on WbeBus, and then click on Destinations. A window opens. Click New.
Another window opens and asks what type of destination you want to create. Select Type of Queue and click Next. A window opens as shown in Figure 6:
Figure 6. Defining new destination

Set the identifier to the value WbeOnSc55EventSpace2 and click Next.
You will be at Step 2 of the sequence shown in Figure 6.. From the dropdown box, select the bus on which the destination is to be defined, and then click Next.
You will then be at Step 3 of the sequence shown in Figure 6, the confirmation screen. Click Finish.
Then follow the normal process to save the change to the WebSphere configuration.
In the WebSphere Administrative GUI, expand Resources => JMS and click Queues. Use the dropdown box for Scope to set the location in your cell where the resource is to be defined and then click New. Fill in the fields as shown in the table below:
Table 1. JMS Queue definition values
| Field | Value |
|---|---|
| Name | CICSEventMsg |
| JNDI Name | Jms/CICSEventMsg |
| Bus name | WbeBus |
| Queue name | WbeOnSc55EventSpace2 |
Let the other fields take default values. Click OK to save the new definition and then follow the normal process to save the change to the WebSphere configuration.
Defining activation specification
In the WebSphere administration GUI, expand Resources => JMS and then click Activation specifications. Use the dropdown box for Scope to set the location in your cell where the resource is to be defined, and then click New. Fill in the fields as shown in the table below:
Table 2. Activation specification definition values
| Field | Value |
|---|---|
| Name | Mq-to-Wbe |
| JNDI Name | as/MQ-to-Wbe |
| Destination type | Queue |
| Destination JNDI name | Jms/CICSEventMsg |
| Bus name | WbeBus |
Click OK to save the new definition, and then follow the normal process to save the change to the WebSphere configuration.
Defining WebSphere MQ links to WebSphere Business Events server
To enable the z/OS WebSphere MQ queue manager to send messages to the SI Bus On the WebSphere Business Events server, you must define a foreign bus connection between the two. In the WebSphere administrative GUI, expand Service integration => Buses, and then select WbeBus => Foreign bus connections. Then click New.
A window opens and asks what type of Foreign bus connection is to be defined. Select Direct connection and then click Next.
in the next window, select WebSphere MQ and click Next:
Figure 7. Selecting Foreign bus type

In the next window, as shown in Figure 8 below, select from the dropdown the Messaging engine that will host the connection you are defining. In the Virtual queue manager name field, enter the name of the virtual queue manager associated with the messaging engine, and the name by which the messaging engine is known to the remote WebSphere MQ network.
Figure 8. Selecting messaging engine

Click Next. The following window opens:
Figure 9. WebSphere MQ details

Fill in the fields as shown in the table below:
Table 3. WebSphere MQ definition values
| Field | Value |
|---|---|
| Foreign Bus Name | MQCR |
| MQ link name | MQCR_on_SC66 |
| WebSphere MQ receiver channel name | sc55_wbeBus_to_MQCR |
| Host name | wtsc66.itso.ibm.com |
| Port | 1415 |
| WebSphere MQ sender channel name | MQCR_To_sc55_WbeBus |
Of course, you need to use values that reflect your z/OS environment and WebSphere MQ queue manger. The port value is the TCP/IP port that the z/OS WebSphere MQ channel initiator is listening on. You can see the value in the channel initiator STC job log, in a message similar to this:
+CSQX023I -MQCR CSQXLSTT Listener started, port 1415 address *, TRPTYPE=TCP INDISP=QMGR |
The channel names must exactly match the corresponding channel names in the WebSphere MQ queue manager channel definitions. If they do not then the channels will not start.
After deploying the application EAR file and defining all the required resources, stop and start the WebSphere Business Events server to bring all the changes into effect.
Resources required in WebSphere MQ queue manager
Define the following resources in the z/OS WebSphere MQ queue manager. The following examples of the required definitions show the values used in the IBM z/OS environment. Modify these values to suit your own environment.
Issue the following command to define the transmission queue that will store messages that WebSphere MQ sends to the SI Bus in the WebSphere Business Events server:
define channel('MQCR_To_sc55_WbeBus') chltype(sdr)
conname('wtsc55.itso.ibm.com(14273)')
trptype(TCP) xmitq('edSc55WbeBus')
|
The port value of 14273 is the value assigned to the port SIB_MQ_ENDPOINT_ADDRESS in the WebSphere Business Events server.
Issue the following command to define the sender channel from the WebSphere MQ queue manager to the SI Bus in the WebSphere Business Events server:
define qlocal('edSc55WbeBus') usage(xmitq) |
Issue the following command to define the receiver channel between the WebSphere MQ queue manager and the SI Bus in the WebSphere Business Events server:
define channel('sc55_wbeBus_to_MQCR') chltype(RCVR) trptype(TCP) |
Issue the following command to define the remote queue to which the CICS region writes the XML-formatted messages:
DEFINE
qremote('DP.CICS.CBE.INSUF.STOCK.SC55.WBE.ED')
DESCR('Edward Queue events insufficient stock')
XMITQ('edSc55WbeBus')
RQMNAME('WbeBus') RNAME('WbeOnSc55EventSpace2')
|
The value specified for the RNAME value must match the name of the destination queue defined in the SI Bus in the WebSphere Business Events server.
Issue the following command to start the sender channel from the WebSphere MQ queue manager to the SI Bus in the WebSphere Business Events server:
start channel('MQCR_To_sc55_WbeBus') |
If the channel starts, you should see this reply:
CSQXCRPS ' START CHANNEL' NORMAL COMPLETION |
Also, in the WebSphere MQ channel initiator STC, you should see this message:
CSQX500I -MQCR CSQXRCTL Channel MQCR_To_sc55_WbeBus started |
Checking that channel to SI Bus is started
In the WebSphere Business Events server, check the Adjunct region STC for the following message, which indicates that the channel from the WebSphere MQ queue manager to the SI Bus in the WebSphere Business Events server has started:
BBOO0222I: CWSIC3111I: The receiver channel MQCR_To_sc55_WbeBus for WebSphere MQ link MQCR_on_SC66 has started. |
You can check the status of the connection between the WebSphere MQ queue manager and the SI Bus in the WebSphere Business Events server. Select Service integration => Buses => Bus in use => Foreign bus connections => Your foreign bus connection => WebSphere MQ links to get to a display similar to that shown below:
Figure 10. Checking WebSphere MQ links

To test that your CICS region can send a WebSphere Business Events XML-formatted event message to the WebSphere Business Events server using this approach, your CICS TS V4.1 region must be set up to create such an event. For information on this task, see the two IBM Redbooks in the Resources section below.
WebSphere Business Events provides a specialised service to process and analyse real-time events received from any number of sources. This article has described a simpler way to establish the connectivity to send event messages from CICS TS V4.1 to a WebSphere Business Events server.
| Description | Name | Size | Download method |
|---|---|---|---|
| Code sample | attachment.zip | 10 KB | HTTP |
Information about download methods
- IBM CICS resources
- IBM Redbook: Implementing event processing with CICS
This IBM Redbook explains business event processing with CICS TS, including CICS operating as a standalone system, or in conjunction with WebSphere Business Monitor and/or WebSphere Business Events. - IBM Redbook: Leveraging CICS events with an ESB
This IBM Redbook shows examples of using three different IBM ESB products to transform and enrich events received from CICS TS. It also explains the basics of ESB technology, event processing, and the CICS TS implementation of event processing. - Running the technology connectors on z/OS
Topic from WebSphere Business Events information center - IBM CICS product page
Product descriptions, product news, training information, support information, and more. - IBM CICS TS for z/OS information center
A single Web portal to all WebSphere Adapters documentation, with conceptual, task, and reference information on installing, configuring, and using CICS TS for z/OS. - IBM CICS services
IBM has a comprehensive range of services to help you assess, plan, design, upgrade, secure, manage, implement, and successfully exploit CICS solutions within your organization. IBM CICS services can help you lower your costs and maintain a competitive advantage. Direct from the Hursley lab, we have the services and expertise to help you maximize your investment in CICS.
- IBM Redbook: Implementing event processing with CICS
- IBM WebSphere Business Events resources
- WebSphere Business Events product page
Product descriptions, product news, training information, support information, and more. - WebSphere Business Events information center
A single Web portal to all WebSphere Adapters documentation, with conceptual, task, and reference information on installing, configuring, and using WebSphere Business Events. - WebSphere Business Events support
A searchable database of support problems and their solutions, plus downloads, fixes, problem tracking, and more.
- WebSphere Business Events product page
- IBM WebSphere resources
- developerWorks WebSphere developer resources
Technical information and resources for developers who use WebSphere products. developerWorks WebSphere provides product downloads, how-to information, support resources, and a free technical library of more than 2000 technical articles, tutorials, best practices, IBM Redbooks, and online product manuals. - developerWorks WebSphere application connectivity developer resources
How-to articles, downloads, tutorials, education, product info, and other resources to help you build WebSphere application connectivity and business integration solutions. - developerWorks WebSphere business process management developer resources
WebSphere BPM how-to articles, downloads, tutorials, education, product info, and other resources to help you model, assemble, deploy, and manage business processes. - developerWorks WebSphere SOA and Web services developer resources
How-to articles, downloads, tutorials, education, product info, and other resources to help you design and build WebSphere SOA and Web services solutions. - Most popular WebSphere trial downloads
No-charge trial downloads for key WebSphere products. - WebSphere forums
Product-specific forums where you can get answers to your technical questions and share your expertise with other WebSphere users. - WebSphere on-demand demos
Download, watch, and learn what WebSphere products and WebSphere-related technologies can do for your company. - developerWorks WebSphere weekly newsletter
The developerWorks newsletter gives you the latest articles and information only on those topics that interest you. In addition to WebSphere, you can select from Java, Linux, Open source, Rational, SOA, Web services, and other topics. Subscribe now and design your custom mailing. - WebSphere-related books from IBM Press
Convenient online ordering through Barnes & Noble. - WebSphere-related events
Conferences, trade shows, Webcasts, and other events around the world of interest to WebSphere developers.
- developerWorks WebSphere developer resources
- IBM developerWorks resources
- developerWorks blogs
Join a conversation with developerWorks users and authors, and IBM editors and developers. - developerWorks Webcasts
Free technical sessions by IBM experts that can accelerate your learning curve and help you succeed in your most difficult software projects. Sessions range from one-hour Webcasts to half-day and full-day live sessions in cities worldwide. - developerWorks podcasts
Listen to interesting and offbeat interviews and discussions with software innovators. - developerWorks on Twitter
Check out recent Twitter messages and URLs. - IBM Education Assistant
A collection of multimedia educational modules that will help you better understand IBM software products and use them more effectively to meet your business requirements.
- developerWorks blogs
Edward McCarthy is an IBM certified Senior Middleware Specialist and Client Technical Specialist on the WebSphere on System z Technical Sales team for IBM Australia. He has more than 10 years experience working with WebSphere Application Server, and has contributed to several IBM Redbooks. Prior to joining IBM, he worked as a CICS and MQ system programmer. You can contact Edward at edwardmc@au1.ibm.com.




