Using CICS IA daily
In this chapter, we look at how CICS Interdependency Analyzer (IA) can be used on a daily basis to understand the impact analysis of code changes.
3.1 Day-to-day usage
In this section, we look at how CICS IA can be used daily to assist with analyzing the impact of application changes. We also cover how CICS IA can be used to assist with the following actions:
Governance: Reviewing code changes while deploying from development to test to production
Operations: Understanding operation resource relations
Abend analysis: Using IA data to understand changes
3.1.1 Impact analysis of application changes
In this section, we see how the CICS IA Explorer plug-in can quickly give you an understanding of the CICS regions, transactions, and programs that are impacted when a developer changes a program. A better understanding of this impact can lead to quicker changes with less risk.
We demonstrate how CICS IA can help by using example use cases.
Use Case 1
As an application developer, I have been asked to add a field to my customer file, KSDSCUST. Before I start what do I need to know?
What programs use file KSDSCUST?
Use Case 2
As a tester, I have been asked to test the changes to the customer file, KSDSCUST. Before I start what do I need to know?
Which transactions do I need to run to test file KSDSCUST?
Which CICS regions can I use to test my changes?
Use Case 3
As a systems administrator, I have been asked to deploy the changes to the customer file, KSDSCUST, into production. Before I start what do I need to know?
Which other resources do the changed transaction impact?
Have any “site” standards been broken?
Let us look at how CICS IA can help with these questions.
First, we need to know if we collected data for file KSDSCUST. In the CICS IA plug-in, we can display all resources collected from the search bar as shown in Figure 3-1.
Figure 3-1 The CICS IA resource find bar
You can filter this search by resource type, by the resource name, and the CICS region. In this case, we find all FILE resources starting with KSDS as shown in Figure 3-2.
Figure 3-2 Find all files starting with KSDS*
When you set your filters, select the green run arrow. The results are displayed in the Show Resources view as shown in Figure 3-3.
Figure 3-3 Results for a search for all files starting with KSDS
We can see that there are two files: KSDSCUST and KSDSPOLY. We are interested in the KSDSCUST file. We can now start to answer some of our questions.
What programs use file KSDSCUST?
To find out which programs use this file, right-click KSDSCUST and select Used by Programs  All Regions as shown in Figure 3-4.
Figure 3-4 Which programs use file KSDSCUST?
The results of this question are shown in the Used By view as shown in Figure 3-5 on page 63.
Figure 3-5 Programs using file KSDSCUST
We can quickly see that program LGUCVS01 issues a “Read for update” and a “Rewrite” against this file; program LGACVS01 issues a “WRITE” against the file.
We can also see some information about how these programs were invoked. For example, program LGUCDB01 issued an EXEC CICS LINK to program LGUCVS01.
What transactions use file KSDSCUST?
As we did before to find out which transactions use this file, right-click KSDSCUST and select Used by Transactions  Specific Region. In this case, we select our region as shown in Figure 3-6.
Figure 3-6 Choose your CICS region
Again, the results are shown in the Used By view, as shown in Figure 3-7.
Figure 3-7 Transactions using file KSDSCUST
 
Note: Your previous Used By view for your program query is not lost. It can be restored by using the left and right yellow arrows in the upper-right corner of the view as shown in Figure 3-8.
Figure 3-8 Left and right view arrows
These arrows can be found in many of the CICS IA views including the Show Resources view.
In what regions can I test the changes to file KSDSCUST?
We already answered this question by asking for which transactions use the file in a specific region, as shown in Figure 3-6 on page 63. You can also ask a specific query by right-clicking the file and selecting “Used by Regions” as shown in Figure 3-9 on page 65.
Figure 3-9 Used by Regions selection
In this case, the results are shown in the Show Resources view as shown in Figure 3-10.
Figure 3-10 CICS regions using FILE KSDSCUST
 
Note: You can use the right and left yellow arrows to scroll through and see the results for all your questions.
Which other resources does the changed transaction impact?
We already discovered that the KSDSCUST file is used by transaction SSC1, but before deploying this change it would be good to understand the other resources used by this transaction.
From the Used By view, right-click the SSC1 transaction and select Uses Resources  Specific Region as shown in Figure 3-11.
Figure 3-11 Which resources do transaction SSC1 use
You can then select your region and the results are shown in another new view, the Uses view, as shown in Figure 3-12 on page 67.
Figure 3-12 The Uses view for transaction SSC1
3.1.2 The Uses view
The Uses view is split into three different areas:
Resources used
By program
Program flow
The “Resources used” view lists the resources used by this transaction. The resources are grouped by resource type and can be expanded to show the resource name and the commands issued against that command as shown in Figure 3-13.
Figure 3-13 Resources used by SSC1
You can use the toggle icon in the upper-right corner to show the resources by command followed by resource name as shown in Figure 3-14 on page 69.
 
 
 
Figure 3-14 Resources used by SSC1: Toggled to show commands
The “By resource” section lists the specific programs that use a resource or a command when selected in the “Resources used” section. For example, you can quickly see which programs use TSQUEUE GENACNTL by selecting this resource and looking in the By Program section as shown in Figure 3-15.
Figure 3-15 TSQUEUE GENACNTL is used by program LGTESTC1
The third and rightmost section of the Uses view displays the program flow.
 
Note: The flow is not in chronological order.
It shows CALLs, LINKs, and XCTLs issued by programs. Again, if you select a resource in the Resources used section, the programs that use it are shown in both the By Program section and the flow section as shown in Figure 3-16. This example shows that the file KSDSCUST is used by two programs, LGUCVS01 and LGACVS01, as shown in the By Program section. The flow section highlights where program LGUCVS01 is within the overall flow of the SSC1 transaction.
Figure 3-16 Program flow for transaction SSC1: Highlighting KSDSCUST file usage
3.1.3 Using a user query to govern site standards
As a systems administrator, I want to make sure that the latest development work has not introduced any commands that are not allowed to be deployed into production. For example, many COBOL developers use EXEC CICS ASKTIME and the COBOL DISPLAY command for diagnostic purposes during testing and usually forget to remove them. You can use CICS IA to check for these commands. There are a number of methods to perform this check.
We look at two methods.
Method 1
You know that changes have been made to transaction SSC1 so you can simply show resources used by this transaction and look for the DISPLAY and ASKTIME commands as shown in Figure 3-17.
Figure 3-17 A DISPLAY command is issued by program LGACVS01
Method 2
In this method, we introduce the CICS IA Query Editor feature to create a generic query to look for DISPLAY and TIME commands. The query editor allows you to generate simple SQL to answer more specific questions than the IA plug-in resource views allow.
The IA plug-in is shipped with “supplied queries,” which are ready for immediate use. These queries can assist with CICS TS upgrades and other common questions that are relevant to most customers. These queries can be found in the Navigation view under the Queries folder as shown in Figure 3-18.
This feature also allows you to create your own user queries, which can be more specific to your configuration and to your needs. We create a user query to display programs that issue the DISPLAY command.
Figure 3-18 IA supplied queries
In the Navigation view, right-click the User Queries folder and select New  CICS query as shown in Figure 3-19 on page 73.
Figure 3-19 Create a CICS query
The Query window editor opens as shown in Figure 3-20.
Figure 3-20 Query editor window
The editor is broken into four input areas:
Name
Show
Filter results 1
Filter results 2
The Name input field allows you to name your query. For example, “Show DISPLAY command”.
The Show input area allows you to select which columns to display in the output. You can use the pull-down arrow to select the columns you want as shown in Figure 3-21.
We select the Applid, Transaction, Program, and Command columns. You can use the yellow up and down arrows to put the columns in the order you want. You can use the red “X” icon to remove columns.
Figure 3-21 Choose the columns to display
The “Filter results” input area allows you to set your column filters. This option corresponds to the WHERE clause in an SQL SELECT. Again, you can use the pull-down arrow, the red “X” icon, and the yellow up and down arrows. In this case, we filter by the COMMAND column where the function is a DISPLAY command. First, we use the pull-down arrow to select the COMMAND column. This action then adds in the filter results input area, which allows you to set the filter. This area is specific to the column you select. In this case, we selected the COMMAND column and the input area allows us to select which commands we want to include, as shown in Figure 3-22.
Figure 3-22 User query to list programs that issue a DISPLAY command by region and transaction
Click OK to save this command in the User Queries folder. You can then run the query by double-clicking or right-clicking and selecting “Run” as shown in Figure 3-23.
Figure 3-23 Running a query
The results are shown in the Show Resources view as shown in Figure 3-24. We can see that the modified program LGACVS01 is using a display command.
Figure 3-24 Results of the user query
3.1.4 More on IA plug-in user queries
There are several more things that you can do with user queries, including the following actions:
Saving the results
Saving the query and pasting the SQL
Comparing the results
Saving the results
To save the results, select the Show Resources view and then select File  Save in the upper-left corner as shown in Figure 3-25, or enter CTRL+S.
Figure 3-25 Saving a query
This action opens a window where you can enter a description of the query being saved as shown in Figure 3-26.
Figure 3-26 Enter a description
Click OK and the results are saved under the actual query in the User Queries folder as shown in Figure 3-27.
Figure 3-27 Results are saved in the IA Navigation view
The results can then be copied and can be used as input to a spreadsheet product.
Saving the query and pasting the SQL
As well as saving and copying the results, you can copy and paste the SQL that drives the query. Right-click the query and select “Copy” as shown in Figure 3-28 on page 79.
 
 
Figure 3-28 Copying the SQL
You can then paste this copy into a document or directly into the DB2 SPUFI tool. In this case, I pasted the query into the book as shown in Figure 3-29.
SELECT DISTINCT APPLID,TRANSID,PROGRAM,FUNCTION
FROM CICSIA53.CIU_CICS_DATA
WHERE FUNCTION='DISPLAY'
ORDER BY APPLID, TRANSID, PROGRAM, FUNCTION
Figure 3-29 Pasted SQL command
Comparing the results
The Show Resources view can be used to compare the results of two similar queries. In the following example, we compare resources used by region IYDZZ518 and region IYDZZ528. We created and executed two queries that show the resources used by the respective regions. We can then select the compare icon as shown in Figure 3-30.
Figure 3-30 Compare query results
You can then select the results that you want to compare as shown in Figure 3-31.
Figure 3-31 Compare resources in IYDZZ528 and not in IYDZZ518
The results are shown in the Show Resources view as shown in Figure 3-32. We can see that transaction SSP4 is only used in CICS region IYDZZ528.
Figure 3-32 Compare results
..................Content has been hidden....................

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