Modernization with CICS Events
In this chapter, we demonstrate how the CICS Interdependency Analyzer (IA) collected data can assist with generating CICS Events.
7.1 Modernizing with CICS Events
In this section, we look at how CICS IA can be used to assist when creating IBM CICS Transaction Server (TS) Events.
IBM CICS TS business applications are the main source of business information in most large enterprises. The CICS run time detects instances of events that are enabled and captures the events and payload without the need to make application code changes or to provide system code. CICS Event processing is a core component of the CICS run time and provides all the qualities of service you would expect of CICS. It is possible to emit events in formats that are suitable for use by IBM Operational Decision Manager Events, IBM Business Monitor, and other users.
For more information about CICS TS Events, see the IBM Redbooks publication Event Processing with CICS, SG24-7792. See the section for information about “Help from IBM” on page 240.
We look at the following topics:
Creating a CICS TS Event using the IA plug-in
Capturing CICS IA Event data
We use the following scenario.
The GENAPP application allows you to create new insurance policies for an existing customer. It also allows you to create new customer records. The company manager wants to quickly inform his team of insurance brokers that a new customer account has been created.
Updating the GENAPP code to achieve this requirement would be expensive. By using the application knowledge provided by the collected CICS IA data, we can achieve this requirement by using a CICS TS Event.
In this example, we call the event: NEW_CUSTOMER.
7.1.1 Creating a CICS TS Event using the IA plug-in
In this section, we perform the following actions:
Create a CICS Bundle project
Understand how GENAPP creates a new account
Drive the Event wizard from the CICS IA perspective
We do not deploy the event. Information about how to fully install and deploy the event can be found in “Chapter 6 - Capture Application Events” in the Redbooks publication Event Processing with CICS, SG24-7792. See information about “Help from IBM” on page 240.
Create a CICS Bundle project
CICS TS Events are created as CICS Bundles and are eventually exported to the zFS directory as part of the deployment. Before using CICS IA to create an event, we need to create a CICS Bundle project to manage this event.
You create a CICS Bundle project by using the CICS Explorer. Go the “Resources” perspective and right-click the Project Explorer view and select New  Project as shown in Figure 7-1.
Figure 7-1 Creating a CICS Bundle project
This action opens the New Project wizard. Select “CICS Bundle Project,” as shown in Figure 7-2.
Click Next.
Figure 7-2 Select a CICS Bundle project
Enter a meaningful name for your CICS Bundle as shown in Figure 7-3 on page 185.
Figure 7-3 Enter a name for your CICS Bundle project
Click Finish. We can now go back to the IA perspective and see where we should add the event.
Where does the GENAPP application create a new account
We now need to understand the GENAPP application to determine where best to trigger the NEW_CUSTOMER event:
Where do we start?
What do we already know?
We know that transaction SSC1 is used to manage the customer accounts. So we see what resources are used by this transaction in region IYDZZ518, our test region.
In the Transactions view, right-click transaction SSC1 and select Uses Resources  Specific Region as shown in Figure 7-4.
Figure 7-4 What resources are used by transaction SSC1
We select region IYDZZ518 and the Uses view displays the resources used by transaction SSC1, as shown in Figure 7-5 on page 187.
More information about the Uses view can be found in 3.1.2, “The Uses view” on page 67.
 
Figure 7-5 Resources used by transaction SSC1
We can see that the transaction uses file KSDSCUST and it issues an EXEC CICS WRITE against this file. We can assume from local knowledge that the WRITE is used to add a new customer record. By selecting the WRITE command, we can see that this command is issued by program LGACVS01.
Again, we can assume from local knowledge that program LGACVS01 adds a new customer record to the VSAM file KSDSCUST.
If you need to further understand the source code, you need to look at the source code. You can use IBM Rational Asset Analyzer with CICS IA to look at the actual source code. More information about Rational Asset Analyzer can be found in Appendix A, “IBM Rational Asset Analyzer” on page 225.
We drive the NEW_CUSTOMER event when program LGACVS01 is linked to. We only drive the event when the transaction is SSC1 and program LGACDB01 issues the link.
We can perform this action by right-clicking the LGACVS01 program in the By Resource section and selecting Create Event  LINK PROGRAM as shown in Figure 7-6.
Figure 7-6 Creating a program link event
You then need to select a CICS region where this event will be deployed as shown in Figure 7-7.
Figure 7-7 Select a CICS region
This action then drives the CICS TS Event wizard. First, you need to select the CICS Bundle project that you created previously and then give your event a name, as shown in Figure 7-8.
Figure 7-8 Create an event binding for your event
Click Finish and the Event Binding editor is opened as shown in Figure 7-9.
You can see that we created one event specification called NEW_CUSTOMER.
Figure 7-9 Event Binding editor
We can now click the Specifications folder shown in the lower-left corner and select the specification for “Capture_NEW_CUSTOMER” as shown in Figure 7-10. This figure shows the capture point. It has been pre-filled by CICS IA to select LINK PROGRAM as the capture point. If you want to emit an event and there is no suitable capture point in your application, for example, on a DB2 table update, you can use the CICS SIGNAL EVENT and the CICS IA to help in generating the event specification and filters.
Figure 7-10 Event specification
We now look at the Filtering tab as shown in Figure 7-11.
Figure 7-11 Event filtering
You can see that CICS IA pre-filled the following fields:
Transaction ID: SSC1
Current Program: LGACDB01
User ID: JAMESE
Under Event Options, we selected the linked to program as LGACVS01.
For testing purposes, you could leave the user ID set so the event is only emitted when running under your user ID.
You can then add further filtering by using Application Data, then select Information Resources, and finally select your adapter. Again, this process is described in “Chapter 6: Capture Application Events” in the Redbooks publication Event Processing with CICS, SG24-7792. See the following section for information about “Help from IBM” on page 240.
 
7.1.2 Capturing CICS IA Event data
To enable the collection of CICS Events data, you need to configure the collector to collect these events. To collect this data, you need to use the CINT transaction and select option 2 to “Configure Region Information”, then option 4 for “Options” against the default entry or a specific region entry, and then option 3 for “CICS API” calls. You can then change the CINT option for Events as shown in Figure 7-12.
CIU240 CICS Interdependency Analyzer for z/OS - V5R3M0 2015/09/08
CICS Resources Options for 10:41:04AM
CICS Sysid : DFTS CICS Applid : DEFAULTS
Modify the options and press Enter to update, or PF12 to Cancel.
Detect command types: Y=Yes, N=No
D=Yes+Detail ( Only for API types marked with * )
APIs
*Programs . . . D *Files. . . . . D *Transactions . D Task Control . Y
Presentation . Y *TS Queues . . D *TD Queues . . D Journals . . . Y
DTP . . . . . Y Counters . . . Y FEPI . . . . . Y *WEB Services . D
*Exits . . . . D Others . . . . Y *EVENTS . . . . D ATOMServices . Y
XMLtransform . Y WSAddressing . Y
CICS Sysid: Z518 CICS Applid: IYDZZ518 TermID: TC15
F1= F2= F3=Exit F4= F5= F6=
F7= F8= F9= F10= F11= F12=Cancel
Figure 7-12 CICS API options
If you select “Y” against the Events option, we capture data when an event is emitted and when a CICS SIGNAL EVENT is issued.
If you select “D” for detailed information, as well as capturing the above, we also capture information about the Event Binding, Event Capture, and Adapter information.
We capture three resource types when an event is emitted:
Event
Event Capture Specification
Event Binding
These types are shown when you request to see what resources are used by a transaction or program as shown in Figure 7-13. You also see that a SIGNAL EVENT has been issued.
Figure 7-13 Event resources used by transaction SSC1
We also display the full event next to the command that was used for the capture point, in this case the PROGRAM LINK to program LGACVS01, as shown in Figure 7-14 on page 195.
Figure 7-14 NEW_CUSTOMER event at capture point LINK PROGRAM
To open the Properties view, select Window  Show View  Properties from the menu bar (Figure 7-15).
Figure 7-15 Opening the Properties view
Detailed event information is shown in the Properties view when you select the EVENT entry as shown in Figure 7-16.
Figure 7-16 EVENT DETAIL in the Properties view
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset