PreviousEditing Source Code Associating Code with AnnotationsNext

Chapter 8: Analyzing Data Impacts


You need to have read the chapter Start Here for the Tutorials! and worked through the first session, Creating and Loading Projects, before you do this session. In this session, we assume that you have created Sample.prj.


8.1 Overview

This session begins with an introduction to Revolve's impact analysis capabilities and is followed by a hands-on tutorial that incorporates the sample project.

When you edit source code it is highly possible that your changes impact components in addition to the ones you edited. Revolve's Impact Analysis tool is designed to identify where these problems, or impacts, occur so you can alleviate them before they create difficulties.

To begin the impact analysis process, you will start by using the Browsers menu to find an item of interest. Then, continue by using the hypertexting facilities of Revolve to manually follow logical connections defined in the source code to analyze impacts, or have Revolve automatically determine the impact of changing the item. A step-by-step example of both Manual Impact Tracing and Automatic Impact Tracing will be provided in this session.

8.1.1 Impact Analysis

When a change is made to your project's source code, the effects can be minimal or widespread, depending on the relationship between the modified component and other components in the project. Left unmonitored, these changes can be extremely detrimental to the overall integrity of a system. To remedy this possible problem, Revolve provides the Impact Analysis tool, a feature which analyzes the impact that source changes have on a project.

8.2 Preparation

You will apply the procedures in this session to the sample project created in Creating and Loading Projects. If Revolve and sample.prj are closed, open them like before.

8.3 Sample Session

In this session you:

8.3.1 Manual Impact Tracing

To do this:

  1. Select Literals... from the Browsers menu.

  2. Type the character A.

    A should appear in the Literals Match edit box.

  3. Click Match.

    Or hit return on the keyboard to initiate the data search. The information window fills with one entry and the Match edit bar indicates the number of matches which were found in the source code.

  4. Select the A folder by clicking on it with the mouse.

  5. Click Expand Completely.

  6. Select Line 267: under ONLINE6.CBL.

  7. Click View Source Code.

    This toggles the encapsulated Split Screen Editor on and off. Notice that the window is horizontally split and the source code for the selected item is selected in the bottom window. With Revolve in this mode you have unlimited access to source code editing.

  8. Hit the down arrow key 4 times.

    Notice that each time the selection in the top window changes, the corresponding source code is displayed in the Split Screen Editor.

  9. Hit the up arrow key 4 times.

    The A on the line that reads, ONL0006-ACTION-LOAD-I is selected in the Split Screen Editor. All of the locations across the application that use the constant A can immediately be accessed. These locations can be used as starting points for impact analysis.

  10. Click on the ONL0006-ACTION-LOAD-I variable in the IF statement in the Split Screen Editor. Notice Figure 8-1.


    Figure 8-1: Selecting in the Split Screen Editor

  11. Click Definition of Usage.

    This scrolls the Split Screen Editor to the working storage definition of the selected item.

  12. Click Backup one logical level.

    The group level of variable ONL0006I is selected.

  13. Click Next Usage two times to scroll to the location where the variable ONL0006I is used in a CICS INTO clause.

  14. Click Backup one logical level two times to see that the INTO clause is part of a RECEIVE MAP statement.

    The hypertexting features of the Split Screen Editor have allowed you to quickly examine the source code and determine where the variable ONL0006-ACTION-LOAD-I has its value set. This is critical information because the variable was located based on its relationship to the literal A, which was the start of our analysis. Should changes be made to A, ONL0006-ACTION-LOAD-I will be affected.

  15. Click Execution Simulator.

    The Execution Simulator toolbar appears in the window. This allows the code to be simulated in either a forward or backward direction so that the logical paths through the source code can be traced to determine impacts

  16. Click the Run button .

    Since the statement being executed is a CICS RECEIVE, the appropriate Screen view is displayed. Also the Execution Condition dialog is displayed to affirm the conditional statement.

    Since the literal A was an action code, it is not surprising that the screen has an "ACTION:" heading followed by a one byte entry field. In fact, this is the field that is impacted by the literal that you used to begin this analysis.

  17. Press Cancel in the Execution Simulator Condition dialog.

  18. From the Window menu, select the Close All Windows menu option.

8.3.2 Automatic Impact Tracing

So far, the hypertexting facilities of Revolve have been used to manually follow logical connections defined in the source code. A faster, more accurate approach is to have Revolve automatically determine the areas impacted by changing an item. This session illustrates Automatic Impact Tracing by determining the impact of changing the variable TREND-KEY which is used to access the VSAM file PROD.TREND.MASTER.

  1. From the Browsers menu choose the Data Files option.

    The Data Files browser is displayed.

  2. Type *trend* in the Match edit box.

  3. Click Match or hit return.

    The folder PROD.TREND.MASTER is displayed in the information window.

  4. Select PROD.TREND.MASTER.

  5. Click Expand Completely.

    The folder is expanded and all the files that reference the data file are displayed.

  6. Select the line under ONLINE7.CBL that reads:
    Line 100: cics_state_read

  7. Click View Source Code.

    The Split Screen Editor horizontally splits the information window. The source code appears in the lower editing window.

    The selection is positioned to a CICS READ of the dataset TRENDMS. This CICS dataset is an alias for the dataset PROD.TREND.MASTER. The alias is established in the ONLINE.FCT file that is also displayed in the information window.

  8. Position the cursor on the variable TREND-KEY that is used in the RIDFLD option of the selected CICS READ section and right-click.

  9. Select the Tools menu option.

  10. Click the Impact Analysis menu option.

    The Impact Analysis tool is invoked displaying TREND-KEY.

  11. Select TREND-KEY.

  12. Click Impact Tracing.

    The Tracing Group Impacts dialog shows the status of the trace.

    By default, Impact Analysis displays results by name. In the Manual Impact Tracing example, you traced an impact to a screen. Here Revolve has traced it for you. Let's see how the impacts for TREND-KEY effect BMS screens in the project.

  13. Click Options....

  14. Click the Display tab.

  15. Click Type .


    Figure 8-2: Display Tab

  16. Click OK.

    The results are now displayed according to their impact types.


    Figure 8-3: Impacts Displayed by Type

    Impacted screens, buffers, and synonyms are automatically traced and provided for your reference.

  17. Double-click Screens.

    The folder opens to display the impacted screens.

  18. Select the folder for PP3.BMS.

  19. Click View Source Code.

  20. Click Screen View in the Split Screen Editor .

    The Screen view for PP3.BMS is displayed in the lower window.

  21. Click Screen View again to return to the source code.

  22. Go back to the Impact Analysis window and double-click to expand PP3.BMS's folder.

    The traced chain of events that led to the impact are displayed. Each line of text that is displayed explains the movement of the screen to its impact with TREND-KEY. As you move down the trace, observe the corresponding code in the Split Screen Editor.

  23. Close all windows by selecting Close All Windows from the Windows menu.

8.3.3 Before Continuing

You can close Revolve, if you want to stop for now. The project that you have created and loaded is automatically saved.

You can continue with the next tutorial later, by simply reopening the project.


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
PreviousEditing Source Code Associating Code with AnnotationsNext