Importance of event processingAnalyst reports have highlighted that event-driven IT and event processing is poised to play a significant role in enterprise systems. In ‘Use an Event-Driven Approach to Deliver Superior Customer Experience’ Gartner observe that
“responding to events as they occur in real time is becoming key to sustain a competitive advantage and deliver superior customer experience”.
Gartner report G00323118This idea is later reinforced in ‘Follow the Leaders: Digital Business Innovation Is Event-Driven’, where they conclude that
“Event-driven IT could make your organization more innovative and accelerate its transformation into a digital business”
Gartner report G00323880CICS TS customers are well-placed to take advantage of event-driven approaches, using the CICS event processing support that was initially introduced in CICS TS V4.1, and has been enhanced over subsequent releases, including the latest release, CICS TS V5.4. CICS events can give real-time insight into business and system processing, and provide input into making better and more timely business decisions. CICS provides support for
- Business events, also known as application events. These can be emitted from your applications when some business processing of interest occurs, such as a payment being made or a claim being received. Application events are specified and managed using the Event Binding Editor in CICS Explorer.
- Policy events, which can be emitted from a CICS system when an interesting situation occurs, such as a change in system state, or a task exceeding a specified resource threshold. Policy events are defined and managed using the new Policy Definition Editor in CICS Explorer 5.4.
Introducing CICS Policy System RulesA significant enhancement in CICS TS V5.4 is the introduction of system rules as a new kind of CICS policy rule. This provides three benefits:
- It extends CICS Policy support to cover policy rules that apply to the CICS system as a whole, in addition to the existing rules concerning behaviour of tasks that have been available since CICS TS V5.1.
- It unifies system events with CICS policies and simplifies their configuration.
- It provides a new policy definition editor for easier definition and management of policy rules, both system rules and task rules.
Figure 1: The new policy definition editor, showing a policy containing three system rules
Support for CICS Policy system rules can also be made available on CICS TS 5.1, 5.2 and 5.3 regions by applying APAR PI83667.¬†In addition, applying APAR PI88500 to CICS TS 5.1, 5.2, 5.3 or 5.4 regions further enhances CICS Policy support to allow items of static data to be emitted with any policy events and for the policy events themselves to be have user-defined names.¬†CICS Explorer 126.96.36.199 provides the necessary enhancements to the Policy Definition Editor to allow you to define static data items and an event name for your policy rules.Policy system rules are an aid to system management, and can help to provide control of the CICS system. You can learn more about policy system rules from the Using CICS policy system rules to monitor system health blog post, which also includes a simple example showing just how easy it is to set up a rule.
Other enhancements in CICS V5.4Although support for policy system rules is a major improvement, it is by no means the only event processing-related enhancement in CICS TS V5.4, and this article introduces some of those other significant enhancements.
New CICS-provided Transient Data Queue EP AdapterIt is now easy to send event data to a transient data queue, using the ‘TD Queue’ Event Processing Adapter (or TDQ EP Adapter). This can make events available for consumption by reading from a transient data queue, including taking advantage of transient data triggering, so provides further flexibility in how you can choose to process CICS events. The TDQ EP Adapter supports many of the existing CICS event formats, making it a straightforward way to test that events are emitted as you expect, in the desired format, and allowing a choice of formats to be consumed from the queue. Figure 2 shows the event formats supported by the TDQ EP Adapter. In this example, the format selected is the Decision Server Insights Event format, which is discussed in the next section.
Figure 2: Drop-down showing the event formats supported with the Transient Data Queue EP Adapter
Integrate with IBM ODM using the Decision Server Insights event formatCICS event processing provides a number of options for emitting events that allow you to seamlessly integrate with other products, to extend your event processing solutions. For example, you can use IBM Operational Decision Manager (ODM) Decision Server Insights to look for significant combinations of events, such as an unusual sequence of banking transactions. Or even to detect when an event does not happen, such as when a customer shows interest in a product but does not proceed to make a purchase. A new ‘Decision Server Insights Event’ format (shown selected in Figure 2) is supported in CICS TS V5.4, and is also available via PTF on earlier CICS TS V5 releases (see APAR PI55134 for CICS TS V5.3, or APAR PI55133 for CICS TS V5.1 and V5.2), allowing events from CICS to be processed by Decision Server Insights. You can learn more from a series of CICS Developer Center posts starting with More rapid business insight with ODM and CICS integration.
Easier customization of emitted CICS eventsOne of the strengths of CICS event processing has always been that if the provided event processing adapters do not meet your needs, you can write a custom EP adapter to control the formatting and routing of the events. Until now, this has required you to write your own event formatting, but often the main reason for choosing a custom EP adapter is to send events in a fairly standard format over a different transport mechanism or to a different kind of consumer. As of CICS TS V5.4, you can have CICS process the event into a character format, based on the formatting requested in the event specification. A set of
DFHEP.CHAR.nnnnncontainers are now passed to a customer EP adapter in addition to the previous set of
DFHEP.DATA.nnnnncontainers, giving the custom EP adapter the option of handling all of the formatting itself, or of making use of the printable character form where CICS has done most of the hard work.
Ability to capture and emit an entire messageAccording to the results of our recent EP Usage survey, a popular type of event is the Message event, which allows you to emit an event based on (almost) any of the CICS (DFH and EYU) messages; the few exceptions being things like messages issued early during CICS startup. This function is now available as a policy system rule, and provides a convenient way to drive additional actions when system behaviour occurs that is reported via a CICS message. If you make use of the Message system rule in the new Policy Definition Editor, you don’t even need to figure out which inserts you need: the emitted event will automatically contain all the message inserts as separate data items plus the complete message text as one concatenated data item. Figure 3 shows a message system rule that will capture events from some of the dynamic LIBRARY audit messages, using the ‘starts with’ option to select a set of messages.
Figure 3: Example of a message policy system rule.The inclusion of the full message text in the event was in response to a Request for Enhancement (RFE), as were other extensions to event processing in CICS TS V5.4, such as the TDQ EP adapter described earlier.¬†If there is other CICS event processing functionality that you would find useful, please raise a Request for Enhancement.. To illustrate many of these event processing enhancements working together, Figure 4 shows an extract of the event generated by this message policy system rule, when written to a transient data queue in DSIE format (and shown in an XML viewer).
Figure 4: An example of part of a DSIE format event emitted by a message system rule.
How are CICS events being used?Customers are using CICS events for a broad spectrum of scenarios, including:
- sending email notifications about changes in the state of critical files
- automating actions to be taken when certain system conditions occur
- logging the data required by government regulations
- providing financial customers with relevant alerts
- monitoring the success of sales promotions
- and many more