Red paper IBM CICS Event Processing: New Features in V4.2

advertisement
Redpaper
Catherine Moxey
Jenny He
IBM CICS Event Processing: New Features
in V4.2
Introduction
IBM® CICS® Transaction Server for z/OS® Version 4.1 made it possible to support event
processing for business applications. Event processing can help the business community to
gain insight into how their business processes are performing. Furthermore, event processing
can help companies take advantage of new business opportunities by providing a
non-invasive methodology for enhancing existing business applications.
With the potential offered by event processing support, CICS Transaction Server for z/OS
Version 4.2 enhances this capability with a number of new features. This IBM Redpapers™
publication describes several of the most significant of these new features, such as assured
event emission, separate event processing (EP) adapters, and search facilities to help you
understand the effect of application changes.
For more information about the new feature which provides CICS system events, see the IBM
Redpaper™ Gaining Insight into IBM CICS Systems with Events, REDP-4810, in this series.
Assured event emission
Business events carry business importance to users. In many situations users can tolerate
the potential for occasional loss of events, for example, because you are looking for trends
and patterns over a period of time. However, in situations where the user needs to respond to
each and every event, it is vital to make sure that every event that is captured will be emitted
successfully.
CICS TS 4.2 provides assured event emission for your event-critical business solutions.
Assured event emission is achieved by selecting synchronous event emission in the CICS
event binding editor.
© Copyright IBM Corp. 2011. All rights reserved.
ibm.com/redbooks
1
With synchronous event emission, event formatting and emission processing are completed
synchronously within the unit of work of the capturing transaction. The unit of work completes
successfully only if the event is emitted. If the event emission fails, or CICS itself fails, the
capturing transaction will be abended.
Synchronous emission mode is used when the capturing unit of work can only be regarded as
successful if it can be assured that the event has been emitted. With asynchronous event
emission, the event is queued for asynchronous processing by a separate event processing
(EP) dispatcher thread, which reduces the overhead of the capturing transaction, but means
that in those rare situations where the event fails to be emitted, the capturing transaction will
still complete successfully.
If a synchronous event is not emitted, messages are produced in the CICSLog to explain why,
statistics are updated, and the unit of work for the capturing transaction is backed out. Without
assured event emission, if an event fails to be emitted, CICS still provides information and
statistics about the failure, but the capturing unit of work continues successfully and the event
is discarded.
Emission mode for the event is specified in the advanced options when defining an EP
adapter using the CICS event binding editor. Figure 1 shows how synchronous emission
mode is specified. You can also specify whether an event is transactional or not. For more
information about emission and transactional modes, see the information about event
processing adapters in the CICS TS 4.2 Information Center.
Figure 1 Specifying emission mode and transactional mode in the CICS event binding editor
The following examples illustrate situations in which either synchronous or asynchronous
events would be used.
Example for asynchronous events
One example of when asynchronous events are appropriate is when an event for bank
account transaction which exceed $1,000 is used to monitor the frequency of large
transactions in a day, or to recognize high-value customers. The emission of such events is
entirely separate from the application which processes the bank account transactions, which
is not dependent on whether or not the events are emitted successfully.
2
IBM CICS Event Processing: New Features in V4.2
Example for synchronous events
Using an example of withdrawal of money from a bank account, a synchronous event can be
set up so that, if the balance is lower than the amount to be withdrawn, an event is emitted
immediately within the same money withdrawal transaction to trigger a balance transfer
process. In this example, the event is used to drive additional processing, so if the event
emission fails, the withdrawal of money should not be allowed to complete.
With assured event emission and a suitable choice of EP adapter, you can choose the level of
integrity between the business application and the emission and transportation of the event.
Assuring your event emission provides the opportunity to build business-critical, event-based
applications, and extend existing applications in as reliable a way as if you had, for example,
added an MQPUT statement to an application to write an event, but without actually changing
the application. The trade-off is that the synchronous processing that is essential to assuring
that events are emitted might have an impact on your application response time. The
synchronous event emission can also change the behavior of a transaction because an event
emission failure causes the application to back out. A judicious use of synchronous event
emission minimizes the application impact.
It is worth noting that all system events (as discussed in Gaining Insight into IBM CICS
Systems with Events, REDP-4810) are emitted asynchronously to minimize the impact to the
system.
Search facility
With the growing number of event bindings created in your enterprise, it becomes essential to
understand the impact of proposed changes to your CICS applications and systems on the
event specified within these event bindings. You might say, “We emit events from a number of
our applications. If we ever need to make a change to any of those applications, how will we
know which event capture specifications are affected and might need updating?” To help
answer this question, the event processing search facility was made available in CICS TS 4.2.
The event processing search facility is a custom search tool provided in the IBM CICS
Explorer®. This facility searches event bindings and EP adapters in the CICS Explorer
workspace or those installed in a CICSplex that Explorer is connected to. You can search
either by resource name or by variable, structure, and copybook name of an imported
language structure. The search facility will find all capture specifications which match the
searched string. Based on the search result, you can decide which event bindings must
change.
IBM CICS Event Processing: New Features in V4.2
3
For example, if you need to change a program named EVPROC02, as shown in Figure 2,
using the EP search facility, you can search for the string of EVPROC02 with the resource
type of PROGRAM. The scope for the search is the installed event bindings in a CICSplex
SDAYPEG to which the CICS Explorer is connected.
Figure 2 EP search facility
4
IBM CICS Event Processing: New Features in V4.2
Figure 3 shows the event bindings that contain 'EVPROC02' after performing the search.
Expanding each event binding, you can see the details.
Figure 3 EP search results
Separate EP adapters
Another new feature provided by CICS TS 4.2 is the separation of EP adapter definitions from
event bindings. This makes it easier to change the configuration details for how events are to
be formatted and emitted, and to reuse the same configuration details for events in multiple
event bindings.
With this feature, in the CICS event binding editor, you can define a CICS Event Processing
Adapter resource, as separate from a CICS Event Binding resource, as shown in Figure 4.
Figure 4 Separate EP adapter and event binding definition menu options
IBM CICS Event Processing: New Features in V4.2
5
For example, you can define an ABM WebSphere® MQ EP adapter resource called
mq_queue, as shown in Figure 5 under the resource bundle adapterbun1. In an event binding
writetsq1_evb, you can then select the option Use a predefined EPADAPTER resource and
provide the name of mq_queue as the adapter definition. The same EP adapter can be
specified for as many other event bindings as required.
Figure 5 Choosing a separate EPADAPTER resource for an event binding
With the separate EP adapter configuration, you can share the same EP adapter resource
among a number of event bindings while having only one EP adapter resource to manage.
You can also create several types of EP adapter resources and use each of them for specific
emission and delivery requirements.
For example, you can specify one WebSphere MQ EP adapter destined for WebSphere MQ
queue A with emission mode of asynchronous and non-transactional, and another
WebSphere MQ EP adapter destined for WebSphere MQ queue B with emission mode of
synchronous and transactional. According to the business requirements of the events, you
can then choose the appropriate EP adapter for each event binding.
Other event processing features in CICS TS 4.2
Although we have described three of the new EP features available in CICS TS 4.2, other new
features are also available.
A number of additional data types are now supported by event processing, such as short and
long floating point numbers and COBOL zoned decimal data types. For a complete list of the
supported data types, see the CICS TS 4.2 Information Center.
The CICS Temporary Storage (TS) queue EP adapter now supports the XML event formats of
common base event, common base event REST, and WebSphere Business Events (WBE),
adding to its value by providing a way of quickly testing to ensure that the right events are
being produced.
The EXEC CICS INQUIRE CAPTURESPEC command provides new options for system
programmers and developers to determine information about any primary predicate or
application context filters. The new EXEC CICS INQUIRE CAPOPTPRED, CAPDATAPRED, and
CAPINFOSRCE commands can be used to determine information about application command
options, application data predicates, and information sources that are specified in a given
capture specification.
6
IBM CICS Event Processing: New Features in V4.2
You can now define capture specifications to emit events from the file and temporary storage
commands issued by the CICS Atom support and the EXEC CICS LINK commands that are
issued by the CICS-WebSphere MQ bridge program.
Conclusion
In conclusion, CICS TS 4.2 enhances event processing support through both runtime
offerings and improved tooling. All of these enable you to make the best use of event
processing and move towards event-driven business in a fast changing world.
The team who wrote this paper
This paper was produced by a team of specialists from around the world working at the
International Technical Support Organization, Hursley Center.
Catherine Moxey is an IBM Senior Technical Staff Member in CICS Strategy and Planning,
based at IBM Hursley near Winchester, UK. Catherine has more than 20 years' development
experience with IBM, primarily in CICS and System z®, but also in Web services
technologies. She is the architect for the event processing support in CICS Transaction
Server for z/OS.
Jenny He is a Software Engineer in CICS Transaction Server product suite at Hursley, UK.
Jenny has worked at IBM for nine years and has a broad experience in software development,
including Eclipse plug-in development, mainframe product development, agile development
process, solution building and testing for IBM Business Process Management product suite,
and authoring IBM Redbooks®. Jenny holds a Bachelor of Engineering degree in Electronics
from South China University of Technology, and a PhD in optical networking from University of
Essex, UK.
Thanks to the following people for their contributions to this project:
Chris Rayns
International Technical Support Organization, Poughkeepsie Center
Now you can become a published author, too!
Here's an opportunity to spotlight your skills, grow your career, and become a published
author—all at the same time! Join an ITSO residency project and help write a book in your
area of expertise, while honing your experience using leading-edge technologies. Your efforts
will help to increase product acceptance and customer satisfaction, as you expand your
network of technical contacts and relationships. Residencies run from two to six weeks in
length, and you can participate either in person or as a remote resident working from your
home base.
Find out more about the residency program, browse the residency index, and apply online at:
ibm.com/redbooks/residencies.html
IBM CICS Event Processing: New Features in V4.2
7
Stay connected to IBM Redbooks
򐂰 Find us on Facebook:
http://www.facebook.com/IBMRedbooks
򐂰 Follow us on Twitter:
http://twitter.com/ibmredbooks
򐂰 Look for us on LinkedIn:
http://www.linkedin.com/groups?home=&gid=2130806
򐂰 Explore new Redbooks publications, residencies, and workshops with the IBM Redbooks
weekly newsletter:
https://www.redbooks.ibm.com/Redbooks.nsf/subscribe?OpenForm
򐂰 Stay current on recent Redbooks publications with RSS Feeds:
http://www.redbooks.ibm.com/rss.html
8
IBM CICS Event Processing: New Features in V4.2
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area. Any
reference to an IBM product, program, or service is not intended to state or imply that only that IBM product,
program, or service may be used. Any functionally equivalent product, program, or service that does not
infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility to
evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document. The
furnishing of this document does not give you any license to these patents. You can send license inquiries, in
writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of
express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may make
improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time
without notice.
Any references in this information to non-IBM websites are provided for convenience only and do not in any
manner serve as an endorsement of those websites. The materials at those websites are not part of the
materials for this IBM product and use of those websites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring
any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm the
accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the
capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the sample
programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore,
cannot guarantee or imply reliability, serviceability, or function of these programs.
© Copyright International Business Machines Corporation 2011. All rights reserved.
Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by
GSA ADP Schedule Contract with IBM Corp.
9
This document REDP-4809-00 was created or updated on December 8, 2011.
®
Send us your comments in one of the following ways:
򐂰 Use the online Contact us review Redbooks form found at:
ibm.com/redbooks
򐂰 Send your comments in an email to:
redbooks@us.ibm.com
򐂰 Mail your comments to:
IBM Corporation, International Technical Support Organization
Dept. HYTD Mail Station P099
2455 South Road
Poughkeepsie, NY 12601-5400 U.S.A.
Redpaper ™
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines
Corporation in the United States, other countries, or both. These and other IBM trademarked terms are
marked on their first occurrence in this information with the appropriate symbol (® or ™), indicating US
registered or common law trademarks owned by IBM at the time this information was published. Such
trademarks may also be registered or common law trademarks in other countries. A current list of IBM
trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:
CICS Explorer®
CICS®
IBM®
Redbooks®
Redpaper™
Redpapers™
Redbooks (logo)
System z®
WebSphere®
z/OS®
®
The following terms are trademarks of other companies:
Intel, Intel logo, Intel Inside, Intel Inside logo, Intel Centrino, Intel Centrino logo, Celeron, Intel Xeon, Intel
SpeedStep, Itanium, and Pentium are trademarks or registered trademarks of Intel Corporation or its
subsidiaries in the United States and other countries.
Other company, product, or service names may be trademarks or service marks of others.
10
IBM CICS Event Processing: New Features in V4.2
Download