Analyze the impact of change on data elements and IBM DB2 columns
Part 1 described a typical software maintenance lifecycle and walk through the process of identifying assets that are part of a change request based on a set of best practices from our experience with customers.
This section continues with the lifecycle discussion by describing how to perform change impact analysis to manage the scope and risk of a software change request. The subsections that follow explain how you can use IBM® Rational® Asset Analyzer to manage changes, so you can achieve these goals:
- Shorten the maintenance cycle
- Reduce risk
- Ensure quality
Please review Part 1 to refresh your memory on common terminology and the scenario in this series. Exercises in this part reference artifacts created in exercises in Part 1.
Performing an impact analysis
In this step, you explore the various aspects of change impact analysis. Rational Asset Analyzer provides the functionality to perform deep-change impact analysis, which programmatically walks through the control flow, data flow, and statement-level information about programs to determine the set of potentially impacted assets in its inventory, based on a starting point, or seed, for change impact analysis.
However, there are other aspects of change impact analysis that are often ignored. Simply the process of exploring the details of an application -- including its component parts, the data, and the program interactions -- provides a great deal of information about how applications "hang" together. In addition, both simple and advanced search capabilities of the product provide a second level of detail. These, in conjunction with the impact analysis function, can provide a thorough context for the scope and risk of changes. As in Part 1, the focus here is on the process of estimating the scope and risk of changes to data, specifically, although the concepts apply to other changes, as well.
Impact analysis is the function of Rational Asset Analyzer that you use to identify assets that are impacted by a change to a given starting point, or seed. Both data elements and columns, as well as several other types of assets, can be seeds for impact analysis, but you must be aware of the context in which the impact is determined, based on the seed you choose. In the context of this maintenance scenario, the focus is on these three impact analyses:
- Data element
- Impact is analyzed from the context of the data element instance in the program or copybook.
- Impact is analyzed from the context of the column in a table.
- Statement range
- Impact of one or more statements is analyzed within the context of how the data elements in that range of statements is used or declared.
If you know that a data definition within a copybook is used across your enterprise, you will get broader and potentially more complete impact analysis results by performing impact analysis on the statement range rather than on any single data element within a program or column within a table. Impact analysis on a range of statements is discussed the second section of this article.
However, if you are able to find, through searches, all data elements and columns that represent the data that you want to change (as demonstrated in Part 1), and you perform impact analysis on each of those, you will get a complete set of results. Furthermore, you will have more flexibility in how your impact analysis is performed, particularly in these two ways:
- Long-running impact analyses can be bypassed.
- Interim results during multiple seed impacts can be viewed.
The point is that only you can know the level of confidence you have in determining the list of seeds on which to perform impact analysis. You must adjust your process accordingly.
The impact analysis capability allows you to specify a level for the analysis to better control long-running impact analyses. The default is Unlimited, in which complete analysis is performed, including relationships that cross I/O boundaries. Other, more limited levels can be selected if you find that your impact analyses are long-running. See the discussion on use of levels in the Advanced topics section at the end of this article for more details and best practices on how to take advantage of this capability.
In the following sections, you examine impact analysis for data elements and IBM® DB2® columns.
Data element and DB2 column impact analysis
In this exercise, you start with the bookmarks created in Part 1 to perform change impact analysis on data elements.
- Launch Rational Asset Analyzer in your browser by selecting Start > All Programs > IBM Rational Asset Analyzer > IBM Rational Asset Analyzer V6.0 > IBM Rational Asset Analyzer or by entering the URL.
- Select Explore > Bookmarks to go to the Bookmarks summary page shown in Figure 1.
Figure 1. Go to the Bookmarks page
- Select the Data Element Part Numbers CHAR(4) bookmark from the set of bookmarks created.
Figure 2. Select the Data Element Part Numbers CHAR(4) bookmark
- Reduce the set of search results by specifying
PART_NOin the Search data element assets entry field to refine the original set of search results based on
- To select all of these data elements for impact analysis, make sure that you are showing all of the results on a single page.
- Click the check box on the top left of the data element summary table to effectively select all of these data elements, and then click the Analyze impact hyperlink to begin the analysis.
Figure 3. Select all PART_NO data elements to analyze the impact
- In the Impact Analysis wizard (Figure 4), specify a descriptive name for your impact analysis:
All PART_NO Data Elements (Char 4)
- Click Next to continue.
Figure 4. Create an impact analysis
- Start the analysis by clicking the Analyze button. If you have multiple applications defined in Rational Asset Analyzer, you might need to scope your analysis by the application.
Figure 5. Start the analysis
The analysis begins with status displayed in Step 3 of the wizard (Figure 6).
Figure 6. Watch running analysis
- When the analysis is complete, you can click on the Finish button to view your impact analysis results (see Figure 7).
Figure 7. Click Finish to view results of the analysis
Figure 8 shows the impact analysis results overview display.
Figure 8. Impact analysis results overview
- Repeat this process to perform impact analysis on DB2 columns by returning to the Bookmark summary page and selecting the DB2 column search results bookmark.
When naming your impact analysis, specify
All PART_NO Columns. You will use this in a later exercise.
Figure 9. Create the analysis
You now have two impact analyses that you can refer back to, one for all PART_NO Data Elements of type CHAR(4) and another for all PART_NO columns.
Observations about data element and column impact analysis
Limitations on analysis of DB2 seeds
Because of limitations in identifying SQL references, all information about relationships involving DB2 objects might not be recorded, so the completeness of impact analysis on columns might not be what you expect. In particular:
- SELECT * INTO cannot identify related columns when the associated DB2 information has not been scanned.
- When a column name is not qualified by a correlation name and there is more than one table referenced in the SQL statement, Rational Asset Analyzer cannot properly resolve the column name reference unless the DB2 catalog scan results (on the tables involved) has already been loaded into the data base.
The bottom line is that you should always analyze the DB2 catalog associated with your application so that information is complete. The same can be said for applications relying on IBM® CICS® or IMS™ definitions.
What impact analysis on the ABC data element does
- Records immediate impacts from ABC:
- Identifies file where ABC is declared
- Identifies programs and files where ABC is used (modified, referenced)
- Identifies sources of any initial value assignments
- Records impacts on related aliases (data elements, literals, SQL column references):
- Identifies aliases that overlap ABC (parent, children, based on offset and length)
- Identifies use-related aliases:
- Aliases that ABC modifies
- Aliases that modify ABC
- Aliases that reference this alias
- Recurses through these aliases:
- Identifies impacts to program boundaries (entry points, control transfers, I/O)
- Identifies impacts beyond program boundaries (entry points, data stores)
In this section, you have learned how to perform impact analysis using data elements and DB2 columns as seeds. You also gained a better understanding of the use of levels to manage the impact analysis results. Finally, you learned the difference between these analyses and the statement range impact analysis, which is described more completely in the section that follows.
Analyze the impact of change on a range of statements
Part 1 described a typical software maintenance lifecycle and walked through the process of identifying assets that are part of a change request, based on a set of best practices from our experience with customers.
The first section in Part 2 described performing change impact analysis on instances of data elements and DB2 columns, comparing the potential results to what might be expected when performing impact analysis on the data declarations rather than the data instances. Then it continues with the change impact analysis discussion, describing how to perform change impact analysis on a range of statements that represent the definition of a piece of data used across multiple programs and applications in order to manage the scope and risk of a software change request.
Please review Part 1 and the previous section here to refresh your memory on common terminology and the scenario for this series.
Performing a statement range impact analysis
As described in the previous section, impact analysis is the function of Rational Asset Analyzer enabling you to identify assets that are impacted by a change to a given starting point, or seed. Both data elements and columns, as well as several other types of assets, can be seeds for impact analysis, but you must be aware of the context in which the impact is determined based on the seed you choose. In the context of this maintenance scenario, the focus is on these three impact analyses:
- Data element
- Impact is analyzed from the context of the data element instance in the program or copybook.
- Impact is analyzed from the context of the column in a table.
- Statement Range
- Impact of one or more statements is analyzed within the context of how the data elements in that statement are used or declared.
If you know that a data definition within a copybook is used across your enterprise, you will get broader, and potentially more complete, impact analysis results by performing impact analysis on the statement range rather than on any single data element within a program or column within a table. The previous section in Part 2 dealt with data element and column impact analysis. This section covers impact analysis over a range of statements and contrast the results with those achieved in the previous section.
Statement range impact analysis example
In this exercise, you start with the bookmarks created in Part 1 to perform change impact analysis on a range of statements which contain the declaration of the data representing a part number.
- Launch Rational Asset Analyzer in your browser by selecting Start > All Programs > IBM Rational Asset Analyzer > IBM Rational Asset Analyzer V6.0 > IBM Rational Asset Analyzer or by entering the URL. The Home page is displayed in your browser.
- Select Explore > Bookmarks to go to the Bookmarks summary page:
Figure 10. Go to Bookmarks page
- To see the search results, select the bookmark Data Elements Part Numbers CHAR(4) from the set of bookmarks created.
Figure 11. Select the Data Element Part Numbers CHAR(4) bookmark
- Find the first instance of the
PART_NOdata element, which is declared in a copybook, and click the name hyperlink to go to the data element details page.
Figure 12. Select data element PART_NO Declared in Copybook
- Notice the "Other programs including the file with this declaration" table. This shows you that the declaration of PART_NO in the copybook is used in other programs (as expected). Click on the File: hyperlink
DMHSRC30in the header section to open the copybook.
Figure 13. PART_NO details
- On the "File details" page for DMHSRC30, use the Actions menu to select Analyze impact for a range of statements to perform analysis on the declaration statements in this copybook.
Figure 14. Analysis impact of change to range of statements
- In the Impact Analysis wizard, enter a descriptive name for the impact analysis:
PART_NO Definition Impact. This name will be important in the next step.
- Click View Source to determine the range of statements to specify.
Figure 15. Create Statement Range impact analysis
- Find the lines in the source file where the part number data is declared (
part_noin the source code shown in the screen capture in Figure 16b), and take note of those line numbers.
Figure 16. View source to find part_no declaration
- Back on the Impact Analysis wizard, enter
22for the First line: and Last line: values, and click Next to continue:
Figure 17. Specify statement range from source
- Start the analysis by clicking the Analyze button. If you have multiple applications defined in Rational Asset Analyzer, you might need to limit the scope of your analysis to the application.
Figure 18. Click Analyze to run impact analysis
- Click the Finish button to view your impact analysis results:
Figure 19. Click Finish to view results
Figure 20. Impact analysis results overview
You now have a third impact analysis that you can refer back to representing analysis of impacts for a range of statements which define the part number data.
Observations about statement range impact analysis
- The Statement Range result set could be larger than the data element impact analysis result set for PART_NO data elements if you did not identify all instances of PART_NO data elements. However, the data element result set will cross I/O boundaries to pick up additional impact.
- The Statement Range impact analysis looks at use of all data elements within the range specified (in this case "part_no"), but it looks for all uses, not just a specific instance of a data element, as does the data element impact analysis.
- Because of COPY/REPLACING, there might be uses of data elements in a range of statements that are based on different data element instance names in programs. Therefore, cases where a data element instance is declared with a random name based on the definition of the data in the range of statements will be identified among the set of potentially impacted assets.
- The results depend on the range of statements selected.
- Not all data elements matching the *PART?NO* search are identified, because not all of this instances are based on definitions or declarations in the included source range of statements.
The bottom line is that change impact analysis is as much an art as it is a science, and it is dependent upon both the selection of seeds and the structure of your applications. You need to take care in selecting seeds. A combination of approaches, as presented here, is probably necessary.
Other features of impact analysis
- The impact analysis results are named and persisted, so they can be referenced by multiple users.
- Impacts on multiple seeds can be performed simultaneously.
- The results of analysis are committed after each seed is processed so that you can see interim results while impact analysis continues to run.
- The impact analysis on multiple seeds yields a single result set.
- With this test data, the most complete results were found when we were able to identify all data element and column seeds and then perform impact analysis on the complete set. This was done in the first section of this article.
- Statement Range impact analysis is quite complete when you can guarantee that data definition use is based solely on the data defined in copybooks; otherwise, it will not be complete.
Advanced topic: Managing levels of impact analysis
This description of impact analysis levels is accurate through IBM Rational Asset Analyzer Version 188.8.131.52.
Impact analysis functionality in Rational Asset Analyzer starts with an asset, or seed, and proceeds to follow relationships that emanate from that seed to record the set of potentially impacted assets. By default, the set of relationships followed is complete, or unlimited, in the sense that the analysis finds related assets, follows emanating relationships from those assets to find the next level of related assets, and so on. Analysis is complete when there are no more emanating relationships to assets that have not already been analyzed.
In complex systems, or for seeds that are heavily used across the enterprise, these unlimited analyses can be long-running and, furthermore, can yield results that are too complex to be useful. Rational Asset Analyzer enables you to control the depth of the impact analysis by limiting the number of levels traversed. The level is specified in the impact analysis wizard and appears in the header section of a completed analysis so you can easily see how the analysis was performed. The precise definition of this level value varies depending upon the seed for the analysis. An example follows for two levels of impact for a DB2 column change impact analysis, followed by an explanation of levels for data elements.
- Record impact on column's DB2 table or view, continue to the next level.
- Record impact on SQL column references in programs. For each SQL column reference:
- Record impact on SQL column reference, and continue to the next level.
- Record impact on statement, its program and its file, and continue to the next level.
Level 1 impact relationships:
Record the impact on the column's DB2 table or view.
Record the impact on SQL column references in programs. For each reference:
- Record the impact on the SQL column reference.
- Record the statements that contain the SQL column reference.
- Record the file where SQL references are made, and continue to the next level with the file.
- Record the program that contains the SQL column reference.
Level 2 impact relationships:
For the column's DB2 table or view:
- Record the impact on the DB2 system. For the DB2 table:
- Record impact on dependent DB2 views, and continue to the next level with the DB2 view (for example, perform an analysis with DB2 view as the seed).
- For the DB2 view: Record the impact on the referenced DB2 tables, and continue to the next level with the table.
- Record SQL table references in programs. For each reference:
- Record the statements where SQL references the table or view.
- Record the file where SQL references are made, and continue to the next level with file.
- Record the program where SQL references are made, and continue to the next level with program.
- Record the SQL cursor references in programs. For each reference:
- Record the statements where SQL cursor references the table or view.
- Record the file where SQL cursor references are made, and continue to the next level with file.
- Record the program where SQL cursor references are made.
For each SQL column reference:
- Record the impact on the DB2 column, and continue to the next level with the DB2 column.
- Record the impacts on related "aliases" (a data element, an SQL column reference, or a literal in a program). This part of the analysis is quite involved as it follows relationships related to the usage of these aliases.
- For each related alias, record impacts to program boundaries:
- Record impacts on the program's entry points where the alias is used as a formal parameter, and continue to the next level with the entry point. Record the program and the program's file if different from where the data element was declared, and continue to the next level with program or file.
- Record impacts for all control transfers where alias is passed as a parameter, continue to the next level with data element
- Record impact for each I/O record instructions where alias is used as an argument, continue to the next level with data element
- Record impacts beyond program boundaries:
- If data element is used in an I/O record instruction, record impacts on Data Stores – trace forward (input) or back (output) depending on type of I/O record instruction and continue
- If data element is used as a formal parameter in a program's entry point, record impacts on calling programs: trace back and continue
- If data element is used as an argument to call other programs, record impacts on called programs: trace forward and continue
Beyond Level 2 tracing, the traversal path of the impact analysis starting with a DB2 column starts to expand as it hits the impacted data elements and programs. Traversal of the data elements and programs leads to impacts on data stores, data sets, transactions, batch jobs, and so forth.
- Record impacts from the data element:
- Record file where data element is actually declared, continue to the next level with file
- Record program and the program's file if different from where data element was declared, continue to the next level with program
- Record source of any initial value assignment, continue to the next level with data element alias
- Record impacts on related aliases (see the record impacts step, previously)
- Explore the Rational Asset Analyzer page on developerWorks, and learn more about its features and benefits.
- Visit the Rational software area on developerWorks for technical resources and best practices for Rational Software Delivery Platform products.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Improve your skills. Check the Rational training and certification catalog, which includes many types of courses on a wide range of topics. You can take some of them anywhere, any time, and many of the "Getting Started" ones are free.
Get products and technologies
- Download a free trial version of Rational Asset Analyzer.
- Evaluate other IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
- Join the Rational Asset Analyzer forum to ask questions and participate in discussions.
- Rate or review Rational software. It's quick and easy. Really.
- Share your knowledge and help others who use Rational software by writing a developerWorks article. Find out what makes a good developerWorks article and how to proceed.
- Follow Rational software on Facebook, Twitter (@ibmrational), and YouTube, and add your comments and requests.
- Ask and answer questions and increase your expertise when you get involved in the Rational forums, cafés, and wikis.
- Get social about thought leadership. Join the Rational community to share your Rational software expertise and get connected with your peers.
Dig deeper into Rational software on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.