How to use event processing in CICS Marianne Menå Heltborg 1 © 2013 IBM Corporation Agenda What is CICS Events Demo : Building CICS Business Events Summary 2 © 2013 IBM Corporation What is an event ? An event is – Something that happens – An event has a name and usually some data (its payload) Simple Event – A single event, meaningful in itself – E.g. Order replacement, bank account update, stock trade Complex event processing – Detect and respond to patterns of events – E.g. 3 orders from customer A in 2 days or interesting stock trades etc. Business Event Processing – Detect and respond to events that indicate business-impacting situations across the enterprise 3 © 2013 IBM Corporation Event Processing - Why now ? Event processing is not new – Systems management and monitoring – Pub/sub messaging systems Multiple business factors have accelerated event processing requirements – Demand for cost reduction leading to more automation – Technology developments such as RFID – Desire for greater awareness of business behavior through • Business Activity Monitoring • Business Performance Management 4 © 2013 IBM Corporation Business Event Processing provides three key benefits Provides earlier and more intelligent insight, leading to timely and effective response Equips the business user to implement Event Processing Solutions themselves Provide connectivity to the widest range of business events 5 © 2013 IBM Corporation Where can CICS events be captured? Event-enabled API call Non-invasive Program initialization Non-invasive Explicit EXEC CICS SIGNAL EVENT call Simple program change required System event points Non-invasive 6 © 2013 IBM Corporation CICS and event processing – overview Development & Deployment Tools Operational Decision Manager CICS Event Processing Existing Business Logic Captured Events Events Code NOT changed Event Capture Filtering Enrichment Formatting Routing IBM Business Monitor Extensible Secured Monitored etc. Other Event Consumers CICS Transaction Server for z/OS 7 © 2013 IBM Corporation CICS Event Specification Event specification Capture Specification • Description • Business event name • Emitted Business Information • Capture point (subset of EXEC CICS API) • Filter (predicates) • Information Sources Event Binding • Event Specification(s) • Capture Spec(s) • Adapter configuration & event policy information ES Event Specification ES ES ES ES ES CS ECS CS CS CS Event Specification associated with Event Capture Spec(s) CICS Bundle resource • Business event name Event policy EP Adapter Config (Type. Q-name, Tran, etc) Event Binding(s) 8 © 2013 IBM Corporation Event Emission Emission mode can be – Asynchronous (the default): event formatting and emission occurs asynchronously to the capturing UOW – minimal overhead to the transaction – Synchronous: event formatting and emission becomes part of the capturing UOW • Not supported with transaction start EP adapter Synchronous event emission can be used – To extend applications, where successful emission of the event (which drives the additional processing) is part of the application logic • UOW will only complete successfully if the event is emitted successfully – For assured event delivery • Use a recoverable transport, such as persistent WebSphere MQ queues 9 © 2013 IBM Corporation System and application event capture and emission IBM Operational Decision Manager IBM Business Monitor IBM Operational Decision Manager IBM Business Monitor 10 © 2013 IBM Corporation Deployment of Event Bindings Event Binding is the unit of enablement and deployment of CICS event specifications – Groups related events that are to be handled in the same way – Deployed by inclusion in a CICS Bundle • A CICS Bundle resource contains a collection of related CICS resources – An archive file containing resources, artifacts, etc. plus a manifest – Used for a number of new resources, including Event Bindings – Installing a Bundle into CICS will install the included resources – Use Event Binding Editor in CICS Explorer to create event binding(s) within a Bundle project – Export Bundle to zFS using CICS Explorer • Define Bundle resource including the location on zFS – Deploying the Bundle will install the Event Binding and resolve the capture specifications 11 © 2013 IBM Corporation Customer questions 12 © 2013 IBM Corporation Customer question : “I can see how events can be used for non-critical functions like monitoring and analytics, but can I reliably use events to extend my applications if an application can complete successfully even if an event captured from it fails to be emitted?” Solution: synchronous emission mode New Synchronous emission mode option on the EP adapter When Synchronous is used, the emission of the events is Assured Causes events to be formatted and emitted as part of the capturing unit of work If event fails to be emitted, the capturing unit of work will be backed out at syncpoint and its transaction abended ASP7 If emitted over recoverable transport, event delivery can also be assured 13 © 2013 IBM Corporation Customer question : “We emit events from a number of our applications. If we ever needed to make a change to any of those applications how would we know which event capture specifications could be affected and may need updating?” Solution: EP Search Available in CICS Explorer Enter the name of the entity you have changed and EP Search will tell you which events may be affected Can be used to search event bindings in the CICS Explorer workspace, or those installed in CICS regions to which the Explorer is connected EP Search understands semantics of capture specifications 14 © 2013 IBM Corporation EP Search Available in the CICS Explorer Enter the name of the entity you have changed (or are planning to change) and EP Search will tell you which events may be affected Entities include: – CICS resource names – Language Structure names – Language Structure field names When using Import from Structure in Event Binding Editor, details of the copybook/structure name and field name will be saved in the event binding Can be used to search event bindings in the CICS Explorer workspace, or those installed in CICS regions to which the Explorer is connected 15 © 2013 IBM Corporation Customer question : “Can I capture events when something happens in my system, e.g. when a transaction abends or the system load goes over 80% of MAXTASKS?” Solution: System Events No Polling - Events are captured and emitted when the system condition of interest occurs Configured, managed and deployed using the Event Binding Editor just like application events Emitted using EP adapters Do not support synchronous or transactional emission 16 © 2013 IBM Corporation Solution: System Event capture points 6 system event capture points introduced in CICS TS V4 Capture events when: – DB2 connection status changes – FILE enable status changes – FILE open status changes – Unhandled transaction abends – Current active tasks for a TRANCLASS goes above or below a certain percentage of MAXACTIVE – Current active task in a region goes above or below a certain percentage of MAXTASKs Examples of use: – Notify an application that a file it uses has become disabled – Start an additional cloned CICS region if the number of tasks goes above 90% of maxtasks limit for that region – With IBM Business Monitor, monitor frequency of transaction abends during month 17 © 2013 IBM Corporation Demo 18 © 2013 IBM Corporation Event processing in CICS 19 © 2013 IBM Corporation Links to additional information YouTube video about the CICS Event redbook http://www.youtube.com/watch?v=Wc3ss4kjyFs The redbook: Event Processing with CICS http://www.redbooks.ibm.com/abstracts/sg247792.html 20 © 2013 IBM Corporation Demoyou Thank 21 © 2013 IBM Corporation
© Copyright 2024