Red paper Gaining Insight into IBM CICS Systems with Events

advertisement
Redpaper
Catherine Moxey
Jenny He
Xi Bo Zhu
Gaining Insight into IBM CICS Systems
with Events
Executive summary
Increasing challenges have put an even greater demand on enterprises around the world.
These challenges include requirements on business compliance, governance with financial
transparency, information privacy, and process control. However, businesses continuously
look for new opportunities to satisfy new consumer demands by reacting swiftly and
effectively to maximize their full potential.
IBM® System z® is a premier platform, with IBM CICS® Transaction Server for z/OS®
running a huge number of critical business applications. Enterprises look to these business
applications to get possible solutions for their challenges. CICS Transaction Server for z/OS
V4.1 provides the ability to participate in event processing by capturing application events,
which provide insight into the processing carried out in the enterprise's applications. CICS
Transaction Server for z/OS V4.2 extends beyond that, and provides the ability to capture and
emit system events, which provide insight into the state of the enterprise's CICS system and
its resources.
The events are defined without the need to make any application or system changes. They
can also be emitted in a number of standard formats, and thus easily consumed in many
ways, by a range of commercial software products. System events allow the business to gain
insight into whether the systems are able to support and run the business workload required,
and to respond immediately when problems occur. All of these new capabilities open a way to
satisfy the challenges faced by enterprises and, at the same time, inspire the potential for
event-driven enterprise business.
© Copyright IBM Corp. 2011. All rights reserved.
ibm.com/redbooks
1
Introduction
CICS Transaction Server for z/OS (CICS TS) handles billions of transactions a week.
Companies around the world rely on their CICS systems in their daily operation. It is
important that the CICS systems are in a good state and that companies are fully aware of the
operation of the CICS systems that their business relies on.
In CICS TS 4.1, IBM introduced application events that could assist the business community
in gaining insight into how their business processes were performing. In CICS TS 4.2 IBM has
built upon this capability and introduced system events that can help the technical community
understand the health of their CICS systems. Although application events are generally
related to higher-level business processes, system events result from system resources and
application execution. For example, a system event can occur when the total number of
running tasks hits the maximum limit. By monitoring the number of times this event happens
in a certain period of time, you can determine how busy your CICS system is, whether there is
a resource bottleneck or any application abnormality.
As with application events, it is important to note that CICS system events can be
implemented without adding new system programming code, by specifying event-enabled
points in a non-invasive way, allowing swifter deployment and faster time to value.
This paper can help you to understand what CICS system events are and how to use them.
What are system events and application events
A CICS system event is a type of event that results from system activity and contains system
data; a CICS application event is a type of event that results from application program activity
and contains application data. Using system events can help you to understand changes in
the state of your system resources or system health. Using application events can help you to
understand your business applications and business processing.
Event-enabled system points
To source or capture an event, you must have a point at which activity and relevant
information are known for constructing the event. When the activity of interest is a change in
the system, CICS TS 4.2 provides a number of system points where system events can be
captured. The following system event capture points are available:
򐂰 IBM DB2® connection status change
򐂰 FILE enable status change
򐂰 FILE open status change
򐂰 Percentage threshold of maximum tasks in system crossed
򐂰 Percentage threshold of maximum tasks in transaction class crossed
򐂰 Unhandled transaction abend
These system event capture points are built into the CICS system code, and the
corresponding events are emitted (pushed) when the condition happens. Pushing events is
much more efficient than polling CICS systems periodically for changes. Compared with a
polling mechanism, pushing means that you can respond to these events more quickly
because there is no need to wait for a polling cycle before an event is emitted.
2
Gaining Insight into IBM CICS Systems with Events
Specifying system events
System events are specified using an Eclipse-based tool called the Event Binding Editor. This
tool is provided for CICS TS 4.2 as part of the IBM CICS Explorer™ and is also included in
IBM Rational® Developer for System z. The event binding is an XML definition that specifies
events to CICS. Each event binding consists of one or more event specifications, and
references or includes, one event processing (EP) adapter specification. The EP adapter
specification describes the format of the event and the transport or destination for the emitted
event.
Each event specification includes the business information to be emitted and one or more
capture specifications. For system events, only related system information can be mapped to
the emitted business information; unlike at application capture points, there is no application
data to map to business information items.
In each capture specification, the CICS system programmer can choose a system capture
point. Figure 1 shows the system capture points alongside the application capture points in
the Event Binding Editor.
Figure 1 System event capture points
The CICS system programmer can also choose a specific filtering condition under which the
event will be captured. These filtering conditions are called predicates and are matched at run
time.
Figure 2 shows a filtering condition for the FILE enable status system event. The filter
specifies an event is emitted if the enable status of the TESTFILE file changes from
ENABLED while the file is open.
Figure 2 Predicates for the FILE enable status system event
Gaining Insight into IBM CICS Systems with Events
3
The more specific the filtering condition is, the more precise the condition under which the
event is emitted. Therefore, CICS emits a smaller number of more specifically-targeted
events.
Depending on the type of system event, the relevant information that can be captured in the
event by CICS event processing varies. For example, for a FILE enable status change event,
CICS can capture the file name, the data set name, the status of the file before the event
happened, the status of the file after the event happened, and whether the file was open
when the event happened.
Figure 3 shows the data that can be captured for this type of system event. CICS can also
capture the transaction ID and user ID that caused the status change, which can be useful in
certain circumstances.
Figure 3 Capturing data for FILE enable status change event
Figure 4 on page 4 shows the data that can be captured for a system event that crosses a
threshold of the percentage of the maximum tasks limit in a CICS region. In this type of
system event, you can also capture the transaction ID and user ID. However, the system
event data differs. For this event, you can capture the number of tasks before and after the
event occurred, the maximum tasks limit that is defined in the system, and the percentage of
the maximum tasks limit that were in the system when the event occurred.
Figure 4 Capturing data for the event of crossing a threshold percentage of tasks in the system
Event bindings are packaged into bundle resources, which can be deployed into CICS using
the CICS Explorer. For details about CICS event specifications, see the white paper Gaining
4
Gaining Insight into IBM CICS Systems with Events
insight into critical enterprise applications with IBM CICS and business events. Exactly the
same approach is used for both application and system events.
Advantages of using system events
There are a number of advantages of using system events with CICS. System events are
captured in a “non-invasive” way in CICS TS 4.2. There is no need to change your CICS
systems or to create new CICS programs to capture system events. The speed of
implementation is fast, satisfying the business need to respond rapidly, and the process of
accommodating changes is agile.
Using a push rather than a pull mechanism, the impact to the performance of the CICS
system by running event processing is minimized. The emission of system events is
asynchronous, which means that the emission processing is not under the thread in which the
event was detected. Event processing is specifically designed so that emitting system events
will not delay your business applications or the remainder of your system.
As with application events, CICS system events can be formatted in a number of standard
formats to provide integration with other products. With the variety of formats, CICS events
can support a wide range of consumers. The supplied formats are as follows:
򐂰 Common base event (CBE) format, based on Common Base Event version 1.0.1
򐂰 Common base event REST (CBER) format, a basic XML representation of a CICS event
The CBER format can be consumed by any HTTP server that requires events in XML
format.
򐂰 IBM WebSphere® Business Event (WBE) format, an XML representation that is
recognized by WebSphere Business Events
This format can also be used by any consumer that can recognize the WBE XML format.
򐂰 CICS flattened event (CFE) format, a CICS programming data structure
򐂰 CICS container-based event (CCE) format, providing a CICS channel with containers
The CCE format can be used to extend application behavior in an event-driven way by
driving a new CICS transaction, which uses the information passed to it in the
container-based event format.
As with application events, CICS system events can be transported through a number of
popular mechanisms by the provided EP adapters. The formatted events can be sent to a
WebSphere MQ queue, to an HTTP server, to a CICS temporary storage queue, or to start a
CICS transaction. You can also implement a user-written custom EP adapter for specific
business requirements, making it possible to emit events in any format and over any
transport.
Combining these rich capabilities, CICS system events have advantages that are welcomed
by both event emitters and event consumers. For example, CICS system events can be
consumed and combined with other events by WebSphere Business Events to derive
follow-on processing after detecting patterns of these events.
Gaining Insight into IBM CICS Systems with Events
5
Comparing CICS system events with system monitoring tools
The IBM Tivoli® family of products is an IBM solution for processing IT system events. In
particular, IBM Tivoli OMEGAMON® XE for CICS on z/OS is a comprehensive CICS system
monitoring product. It enables monitoring and management of CICS transactions and
resources. In contrast, CICS TS 4.2 event processing provides a light-weight and smaller
scale solution towards monitoring certain aspects of the CICS system. CICS system changes
can be detected immediately by CICS event processing, and with the variety of EP adapters,
these events can be sent out to a number of consumers.
With the real-time analysis component of IBM CICSPlex® System Manager (RTA), you can
define and manage notification of exception conditions at your enterprise. For example, it can
send out MVS™ operator notifications if CICS has reached the maximum tasks (MXT) limit.
With CICS TS 4.2 event processing, you can easily request events when the CICS system
tasks goes higher than 60%, 70%, 80%, 90%, and 100% of MXT. This feature can give
system administrators an understanding of how the system performs prior to reaching the
maximum level, and therefore the ability to react to the condition earlier.
Both IBM Tivoli OMEGAMON XE for CICS on z/OS and RTA support a broad range of system
conditions, but for some conditions use a polling mechanism to acquire the information
needed, which implies a bigger impact on CICS system performance and a less timely
reporting of events. CICS system events are a targeted set of events that particularly benefit
from not using polling.
Business use cases with system events
IBM has a rich suite of software products that support business event processing. Two
important event processing products are WebSphere Business Events and IBM Business
Monitor.
The WebSphere Business Events product is a business event processing engine, which can
combine events from a number of event sources and which allows complex processing of the
events. Decisions about the actions to be taken when a particular pattern of events is
detected can be derived using IBM ILOG® JRules together with WebSphere Business Events
when using the WebSphere Decision Server. WebSphere Business Events provides a
friendly user interface for business users to manage events to achieve business goals.
CICS TS 4.2 can act as an event source to work with WebSphere Business Events. For
example, for any CICS system that has a maximum task limit of 10 or more, you can define a
TASK THRESHOLD system event so that events are emitted when the percentage of the
CICS tasks in the system goes over 80% of the MXT limit. These events can be consumed by
WebSphere Business Events. In WebSphere Business Events, you can define that if three
such events are received over a certain period of time, an email notification is sent to notify
the system administrator to investigate the load on the system. You can also specify that a
cloned stand-by CICS region is to be started to ease the workload of the other systems.
IBM Business Monitor (formerly IBM WebSphere Business Monitor) is a comprehensive
business activity monitoring (BAM) software that provides business users and managers a
real-time and end-to-end view of business processing, events and operations. With IBM
Business Monitor, you can quickly build a dashboard with the CICS events and other sources
of events, and gain insight into your CICS systems. You can also integrate other business
applications based on the events.
6
Gaining Insight into IBM CICS Systems with Events
For example, by specifying a FILE enable status change event with TO_ENENABLESTATUS
being UNENABLED, and a context filter of TRANSID being CSFU, you can monitor whether a
file that is defined with OPENTIME(STARTUP) failed to open during CICS initialization. If the
file fails to open, you get an event, because the enable status changes from DISABLED to
UNENABLED. Figure 5 shows the corresponding filtering configuration of the capture
specification of this event.
Figure 5 FILE enable status system event predicates
Figure 6 shows one such event being displayed on an IBM Business Monitor dashboard. By
monitoring this kind of event, you can be aware of the failure as soon as it happens.
Figure 6 IBM Business Monitor dashboard showing an event when FILE enable status becomes
UNENABLED
Another example is to use an unhandled transaction abend event to monitor how often
unhandled transaction abends happen in the system. Unhandled transaction abends often
indicate problems with the coding of the business application. By monitoring this event, you
have a view of how well the business application is written and whether the application needs
reengineering.
Gaining Insight into IBM CICS Systems with Events
7
Conclusion
In conclusion, with the system event capability provided by CICS Transaction Server for z/OS
for V4.2, you can gain a proactive view of your CICS systems with minimal performance
impact and development overhead. Together with other IBM business processing products,
you can build event-driven business processes to manage your enterprise system.
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 of
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 the CICS Transaction Server product suite at Hursley,
UK. Jenny has worked at IBM for 9 years and has 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® publications. Jenny holds a Bachelor of Engineering degree in
Electronics from South China University of Technology in China, and a PhD degree in optical
networking from the University of Essex in the UK.
Xi Bo Zhu is a Software Engineer from the IBM China Development Lab. He has been
working as a CICS Functional Tester for three years, and mainly focuses on event processing
of CICS TS V4.1 and V4.2. He holds a Master degree of Software Engineering from Tongji
University.
Thanks to the following people for their contributions to this project:
Chris Rayns
International Technical Support Organization, Hursley 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
8
Gaining Insight into IBM CICS Systems with Events
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
Gaining Insight into IBM CICS Systems with Events
9
10
Gaining Insight into IBM CICS Systems with Events
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.
11
This document REDP-4810-00 was created or updated on November 7, 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™
CICSPlex®
CICS®
DB2®
IBM®
ILOG®
MVS™
OMEGAMON®
Rational®
Redbooks®
Redbooks (logo)
System z®
Tivoli®
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.
12
Gaining Insight into IBM CICS Systems with Events
Download