PreviousCustomizing Analysis Tools Estimating Implementation EffortNext

Chapter 7: Refining the Worksheet

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.


7.1 Overview

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.

7.2 Preparation

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.

  1. If you have closed Revolve, open it as before.

  2. If you have closed it, open the Order project by selecting it from the "recently used files" list at the bottom of the Project menu. Then open the worksheet by clicking Enterprise > Open 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:

  1. On the worksheet, click Load Restore from File and select \projects\order\Enterprise\EndofPop.mdb, or whatever name you used.

  2. Click Save Backup to File, and specify Order.mdb as the worksheet into which to save. Click Yes to confirm overwriting.

7.3 Filtering the Worksheet

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:

  1. Go to the Data items tab of the worksheet.

    There are 111 data items.

  2. Right-click the header bar of the Name column and click Define filter.

    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.

  3. Click Add.

  4. In the entry field, type *code*.

  5. Make sure that Hide all except at the bottom is selected.

  6. Click OK.

  7. Click OK to close the Define Filter dialog box.

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.

7.4 Removing Unwanted Items from the Worksheet

Data items with CODE in the name are unlikely to be monetary, so they need removing.

To remove them:

  1. Select all 7 CODE data items by clicking the top item and then Shift-clicking the bottom item, then click Remove from List.

  2. Enter a reason for removing these items, such as, "Name implies not monetary", and click OK.

    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.

  3. Display the full unfiltered worksheet again by unchecking Filtered in the information bar.

    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.

  4. To see the Removed list, right-click the Candidates header bar and click Define filter. The header bar is made up of a row of buttons at the top of the worksheet containing the column headings.

  5. Click Hide candidates and show non-candidates, then click OK.

  6. Check the Filtered checkbox.

    Of the 7 removed items, two have names that imply they might be monetary after all.

  7. Reinstate the two data items that 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.

  8. Click Yes to confirm reinstating the data items.

    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.



    Figure 7-1: User-defined filters list

  9. Click Display Filters.

    The User-defined Filter dialog box shows all filters that are currently applied.

  10. Click OK to close the dialog box.

  11. Return to the unfiltered worksheet again by unchecking Filtered at the top.

  12. Check that the reinstated items have been reinstated.

    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.

7.5 Excluding an Unwanted Set from the Worksheet

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:

  1. Run Use of data items to find data items used in ways that imply they aren't monetary.

  2. Check all the check boxes using Select All, and click OK.

    This set contains 162 data items.

  3. Exclude this set from the worksheet. To do this, drag the set onto Worksheet channel and use the following settings:

  4. Check the removed list to confirm that the items from the set are indeed removed and have the A-No category.

    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.

  5. Right-click the Name header bar, then click Define filter.

  6. Select Hide all except: *code* and click Delete.

  7. Click OK to close the dialog box.

    Now you can see the full Removed list, including all the items you just added.

  8. Uncheck Filtered to return to the unfiltered worksheet again.

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.

7.6 Making a Set from the Worksheet

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:

  1. Double-click Worksheet channel.

  2. On the Operation tab, ensure that Extract from worksheet is selected.

  3. On the Extract Options tab, check POI types and select Data Items - COBOL.
  4. Check Categories and select A-Poss, so that only data items of this category are extracted.

  5. Click OK.

    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.

7.7 Finding Impacted Points of Interest

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.

  1. Drag the set "Worksheet channel" onto the Type of statements tool, and on the All Statements tab, click Select All. Click OK.

    The resulting set has 134 statements, some of which already exist in the worksheet, as you can see because they are gray.

  2. Add this set to the worksheet, using Worksheet channel. This time specify the category A-Poss and a note of your choice. Click OK.

    The worksheet now contains 172 statements (89 plus 83 new ones).

  3. Search for any other missing data items or statements. For now, just experiment with some of the other tools available, such as Data trace to find additional data items implicated.

    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.

7.8 Refining Categories in the Worksheet

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.

  1. On the Data items tab of the worksheet, sort items by note, by clicking on the Notes column heading.

  2. Select all the entries at the top that have the note that starts "Associated with a constant".

  3. Change the A category of these items from A-Poss to A-Yes as follows:

    1. Click Select Category.
    2. Select A-Poss and click Remove.
    3. Click Select Category.
    4. Select A-Yes and click Add.

  4. Now add the X-AutoConv category to these entries in the same way. This category indicates that you intend to fix these entries by automatically converting the constant in some way.

  5. Now select the worksheet entries for the BMS fields, which have a note starting with "BMS".

  6. Normally, you would go through these fields and determine which ones are definitely of interest and which aren't. Then you could change the A category to reflect your findings. We will skip this step for the purposes of the tutorial.

  7. Assign the X-Comment category to the BMS entries, indicating that they don't need fixing, but do need a comment. These data items probably need to be regenerated from the BMS screen maps, but in the meantime they need to be flagged as potential problems.

7.9 Assigning Data Types

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:

  1. On the worksheet, click Administration, then Worksheet properties.

  2. On the Data Types tab, click Add.

  3. In the Type name field, type "SALARY".

  4. In the Description field, type "Pay-related item".

  5. Click OK.

  6. Repeat steps 2 through 5 using the following information:

    The Data Types tab now shows the two data types you have added.

  7. Click OK to close the Worksheet Properties dialog box.

To assign data types to worksheet items:

  1. On the Data Items tab of the worksheet, click the Name header bar to sort the worksheet by name.

    The top two items, CALC-SALARY are obviously pay-related, so you can assign the SALARY data type to them.

  2. Select the two CALC-SALARY items in the worksheet.

  3. Click Select Data Type.

  4. Click the SALARY data type.

    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:

  1. Click Administration, then Worksheet properties.

  2. On the Assignment Rules tab, click Add.

  3. On the New Rule dialog box, ensure the Data Format tab is selected.

  4. Check Has PICTURE, and type S9(4) in the entry field.

  5. At the bottom of the dialog box, select the PRICE data type from the list.

  6. Click OK.

  7. Click OK to close Worksheet Properties.

Now that you have set up an assignment rule, you can automatically assign data types in your worksheet using the rule:

  1. Select all the items in the worksheet by clicking the top item, then pressing the Shift and End keys together to extend the selection to the bottom item.

  2. Click Assign Data Types.

  3. Click Yes on the message asking if you want to reassign manually-assigned data types.

    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.

7.10 Reporting on the Final Worksheet

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.

  1. Click Reports and run the report Export worksheet details to Access.

  2. Specify the report name and ensure that Launch MS Access is checked.

  3. Click OK.

  4. In Access, double-click each of the following reports in turn:

7.11 Exporting Points of Interest to Mainframe Express

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.

  1. Click Reports and run the report Export worksheet details to Access.

  2. Specify the report name Final.mdb and uncheck Launch MS Access.

  3. Click OK to start exporting data.

  4. Click OK on any message about Access not being installed, and on the message telling you that the export is complete.

  5. From the Start menu, click Programs > MERANT Revolve TPS > Extract POI Details.

  6. As you follow the wizard, you will need to specify the name of the report database containing the worksheet information Projects\Order\Enterprise\Final.mdb.

  7. Specify the directory into which to store the POI files, such as Projects\Order. If you want Mainframe Express to automatically detect the points of interest, you should save the files in the same directory as your project sources.

    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.

7.12 Summary

In this session, you:

7.13 Before Continuing

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.

  1. On the worksheet, click Save Backup to File.

  2. Specify the filename EndofRef for the backup worksheet for this Refining the Worksheet chapter.

    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.

PreviousCustomizing Analysis Tools Estimating Implementation EffortNext