Customizing Analysis Tools | Estimating Implementation Effort |
In this session, you look in more detail at the items you have put in the worksheet so far, and use some more analysis tools to add items you know are monetary, delete items you know are not, and set categories to guide yourself or other programmers in why these items need addressing.
Please see the Tutorials Map to check that you have run all necessary previous sessions.
In the previous sessions, you identified monetary points of interest in the application and recorded them in the worksheet.
There are also several more types of analysis to perform to cover all the aspects of the application that could be impacted.
You need to look at each point of interest in more detail, to see if it really is a point of interest (that is, if a change to the code is required), and if so to categorize it.
This session uses the project you created in the chapter Finding Points of Interest and the worksheet you created in the chapter Populating the Worksheet.
If you get part-way through this session and want to restart it, overwrite the current worksheet with the backup worksheet that you made at the end of the previous session:
The worksheet very quickly fills with a tremendous numbers of entries, making it difficult to focus on the entries you are interested it.
To filter the worksheet to display just a subset of entries:
There are 111 data items.
You can filter on a data item's name, its size, its category, or any of the other columns in the worksheet. Because you right-clicked on the Name column, the Name filter tab is shown.
*code*
.
The worksheet still has 111 data items, but it is now filtered and shows
just the 7 data items that have CODE
in their names. Notice
that Filtered in the information bar shows that 7 items are filtered.
Data items with CODE
in the name are unlikely to be
monetary, so they need removing.
To remove them:
CODE
data items by clicking the top item and
then Shift-clicking the bottom item, then click
Remove from List.
Although the worksheet appears empty, notice that the count in the information bar shows that 111 data items remain in the worksheet and 7 data items have been removed.
The data items are not actually removed from the worksheet, but are moved to the Removed list. This enables you to keep a record of the removed items and to reinstate them if need be.
Of the 7 removed items, two have names that imply they might be monetary after all.
LTCODE-SHIP-ORDER-AT-COST
,
and LACODE-UNINVOICED-PROFIT
.
To do this, select the two data items by clicking on one and Ctrl-clicking on the other, then click Remove from list.
Now the worksheet contains 5 removed data items and 106 remain in the worksheet.
When you are working with the Worksheet, it is quite easy to forget which filters you have applied at any time. Fortunately, you can check this quite easily.
The User-defined Filter dialog box shows all filters that are currently applied.
Now, when you subsequently add a set to the worksheet, if the set
contains any of those removed *CODE*
data items, they won't
be re-added to the worksheet, but will stay as removed.
The worksheet now contains 106 data items and 5 removed.
You can add items directly to the Removed list. You do this with items that you know are not of interest. When you subsequently add a set, any items in it that are already in the Removed list don't get added to the worksheet.
To create a set of items that definitely aren't monetary and add these to the Removed list of the worksheet:
This set contains 162 data items.
Notice that 166 data items are removed, but 106 still remain. None of the existing items was removed. All the newly removed items came from the excluded set and have been added directly into the Removed list.
To do this, check Filtered in the Worksheet information bar.
You are now looking at the Removed list, but the filter you applied to data names is still active, so you can't see all of the items you just added.
Hide all except: *code*
and click Delete.
Now you can see the full Removed list, including all the items you just added.
Now, any subsequent operations to add sets to the worksheet automatically exclude these items, because they are already in the Removed list.
The worksheet contains 106 data items and 166 removed.
Just as you can channel a set into the worksheet, you can channel entries the other way, from the worksheet into a set. This can be useful if you want to manipulate a set of worksheet entries to find related points of interest.
To make items from the worksheet into a set:
The resulting set has 104 data items and its title is "Worksheet channel".
Another way of making a set is to select worksheet entries and drag them onto an analysis tool. This is quick but has drawbacks since you lose the audit trail, and so it is useful mainly in the early stages when you investigating which settings and tools are going to be appropriate for your application.
As a final check, there are several other types of analysis that might uncover new potential impacts on the application. For example, a monetary data item might impact the application through the statements involving that data item and also through the other data items in those statements.
In this section, you explore two analysis tools that might be useful in the final stages when double-checking for impacted points of interest.
The resulting set has 134 statements, some of which already exist in the worksheet, as you can see because they are gray.
The worksheet now contains 172 statements (89 plus 83 new ones).
The Data Trace tool takes only a few minutes on the sample project, but you should note that it can take a considerable time to run on large projects, so allow plenty of time and perhaps run it overnight, or restrict the scope of programs on which the tool runs.
As you investigate the application further, you need to record your analysis and your decisions. This includes categorizing worksheet entries according to how sure you are that each is monetary, what sort of problem each is and what sort of code modification each one needs.
You can categorize points of interest in any way that suits your organization or the application. Although Revolve Enterprise Edition comes with a set of categories, you are free to create your own using the Categories tab of the Worksheet Properties dialog box. This enables you to provide a defined set of categories for your work group so that everyone categorizes consistently. For more details, look up Category in the help.
In the default set of categories provided, there are three types of category:
To add categories to the worksheet entries.
As well as assigning categories to worksheet items, you can also assign data types to them. By default, categories are used to flag the status of a POI, as described above. You use them to indicate the degree of confidence you have in the relevance of the POI, and also the kind of remediation that is needed. Data types, however, are used to indicate the type of data represented by the POI. For example, in our sample application we are interested in monetary items. But a monetary item in our code could represent one of many different monetary values: it could be a price, a tax, a salary, a commission payment, a profit, or many other possibilities - and each of these might need to be treated in a different way. You would use data types to indicate these different types in the worksheet.
Once you have created some data types, you can assign them manually to items in the worksheet, or you can set up rules that enable Revolve to assign them automatically. For example, if you were implementing a change to the format of a product code, you could define the existing product code format in a data type assignment rule, and Revolve would automatically flag each one as a product code in the worksheet.
To create some example data types:
The Data Types tab now shows the two data types you have added.
To assign data types to worksheet items:
The top two items, CALC-SALARY are obviously pay-related, so you can assign the SALARY data type to them.
SALARY is shown in the Data Type column of the worksheet against the two items you selected.
If you can define unambiguous rules for assigning data types, it is of course quicker to let Revolve assign them automatically. In our sample application, there are a number of PIC S9(4) data items. From their names and from the fact that they are signed, we know that these are price-related, not salary-related. To set up an assignment rule for these items:
Now that you have set up an assignment rule, you can automatically assign data types in your worksheet using the rule:
The worksheet is updated so that all PIC S9(4) items are assigned the PRICE data type.
If you scroll up the worksheet, you will see that as well as a large number of genuinely price-related items, the PRICE data type has also been assigned to some BMS screen items that are obviously not price-related, such as DISPLAY-FIRST-NAMEL. You could refine the assignment rule to exclude these, for example by checking Does not match name pattern and excluding items that end with "O" or "L", or that begin with "OE0". If you ensure that you set up the most unambiguous rules possible to begin with, you will minimize the amount of manual reassignment you have to do afterwards.
This section shows how to produce a range of reports on the final worksheet, giving details of every point of interest, every file, every category, or whatever you require. You need to have Microsoft Access 97 (or a later version) installed to complete this section.
When you have found all the points of interest in your application, you are ready to modify the code, and to compile and test the modifications. You do this in your preferred development tool.
If you use MERANT Mainframe Express as your development tool, you can import the points of interest from Revolve, so that they are highlighted in the code ready for you to edit.
This section shows how to export the points of interest from the worksheet, so that you can import them into Mainframe Express and use them to identify the lines of code that need modifying.
When you open Mainframe Express and look at the source files of the Order project, each line that contains a point of interest is marked with a target icon.
In this session, you:
The worksheet is persistent and is continually saved, and so it is automatically up to date if you shut down.
However, it is good practice to save a backup of the worksheet, so that you can go back to a previous copy. For example, you might want to return to the current worksheet if you make a mistake in a later tutorial.
If you already have a backup with this name, use a new name such as EndofRef-1.
If you want to take a break before going on to the next session, you can close the project; or you can close Revolve, with or without closing the project.
Return to the Tutorials Map and choose which session to go on to next.
Comments on the books?
Click Send Us Comments.
Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names
used herein are protected by international law.
Customizing Analysis Tools | Estimating Implementation Effort |