Previous Loading an Application into the Database Analyzing Statements and Categorizing Them Next

Chapter 6: Finding Dates and Reviewing the Worksheet

The tutorial in this chapter shows how to find the potentially date-related issues in an application and goes on to describe the worksheet.

6.1 Overview

Now that your application is loaded into the database, you need to find all the potentially problematic data items and statements, and add these to the worksheet. You can then use the worksheet as the central store for year 2000 details, and use it to manage and track your work.

This tutorial applies equally whether you are verifying an application or intending to fix it.

In this tutorial, you:

This tutorial takes about 20 minutes.

6.2 Preparation

This section explains how to run the tutorial for the first time and how to reset everything so that you can restart the tutorial.

6.2.1 Running this Tutorial for the First Time

If you are continuing immediately from the previous tutorial, you can go straight to the section Metering Code.

If you stopped following the tutorials, to experiment independently or to close down SmartFind Plus, start this tutorial as follows:

  1. If SmartFind Plus is not running, restart it in the same way as before.

  2. Open the Tour project by selecting it from the recent files list at the bottom of the Project menu.

6.2.2 Repeating the Tutorial

If you want to redo this tutorial and start this tutorial from the beginning again, you will have an old worksheet with some information in it. To start afresh, you need to open an empty worksheet. To do this:

  1. If you still have the Tour project open, close it using Close on the Project menu.

  2. In Windows, delete the Tour project's worksheet. This has the same name as the project and so is called Tour.mdb, and it is in the project directory, which is Projects\Tour.

  3. If SmartFind Plus is not running, restart it in the same way as before.

  4. Open the Tour project by selecting it from the recent files list at the bottom of the Project menu.

  5. Check that your options are set correctly for the tutorials, as described in the later sections Setting the Analysis Tools Options and Setting the Worksheet Options.

6.3 Metering Code

SmartFind Plus is metered on a line-of-code basis, which means that the code has to have been metered before you can process it through SmartFind Plus. However, only one person needs to meter the code and then everyone can process the code without further cost.

The demonstration programs are already metered, so all you need to do is to point to the file that confirms that the code has been metered. This file is called the metering control file.

When you want to process code other than the demonstration programs, someone authorized will meter the code and tell you where the metering control file is. The metering administrator can authorize users to meter code, by providing an enabled usage counter and setting up the metering control file with write access for those users. Since metering is usually a one-time task, and since it involves debiting your line-of-code credit, effectively paying money, we advise the administrator to limit authorization as much as is feasible for your organization.

  1. Click Analysis Tools on the Year 2000 menu.

  2. If the Analysis Tools are now available, you do not need to do anything about metering. You are already pointing to the correct metering control file that confirms that the demonstration programs are metered. Go the next section, Setting the Worksheet Options.

  3. However, if the Analysis Tools are not available, the Metering wizard starts up. The Redeem application's source files are already metered; you will not be charged for this project. However, you need to point to the metering control file that confirms that the application has been metered.

  4. Follow the wizard's instructions. When asked for the metering control file, point to the directory Sfplus\Revolve\Sample\Meter, which contains the relevant metering control file, factory.bdb. Continue with the wizard and click Finish at the end.

6.4 Setting the Worksheet Options

When you follow any of the tutorials, you need to set up the worksheet and the Analysis Tools with the necessary options, so that your SmartFind Plus behaves the same as that in the tutorial.

The tutorials require you to set Find and Verify mode, so that your SmartFind Plus matches that described in the tutorials. This mode disables some fix options and defaults to verification reports. The later tutorial, Fixing the Date Issues uses Find and Fix mode, so that you can explore the fixing options there.

  1. Click Open Worksheet on the Year 2000 menu. If necessary, click OK to open an empty default worksheet called Tour.mdb for the Tour project.

  2. Click Options Options on the worksheet.

  3. On the Worksheet tab, make sure that the options are set as follows:

  4. Go to the Fix Options tab and make sure that the options are set as follows:

  5. Click OK.

6.5 Setting the Analysis Tools Options

When you follow any of the tutorials, you need to set up the Analysis Tools with the necessary options, so that your SmartFind Plus behaves the same way as that in the tutorial.

  1. Click Analysis Tools on the Year 2000 menu, and click Options Options on Analysis Tools.

  2. On the Set Viewer Options tab, make sure that the options are set as follows:

  3. On the Analysis Tool Options tab, check Edit settings before running tool. If you do not check this, when you subsequently run the Analysis Tools, they run immediately without allowing you to see and change the settings.

  4. On the Scope tab, make sure that Universal Scope is clicked, so that all the programs in the application are searched by the Analysis Tools.

  5. Click OK.

  6. Check that the status line at the bottom of the Analysis Tools window shows Settings: Defaults. This means that the Analysis Tools will use the default settings. If Defaults is not shown, set it as follows:

6.6 Finding the Date Issues

The first step in investigating the extent of the year 2000 problem in your application, is to find all the potentially problematic data items, statements and data files. To do this, you use the Verify - all research analysis tool, which contains the following main tools:

In this section, you find all the potentially date-related elements, using the Verify - all research tool.

  1. Double click Verify - all research in Analysis Tools.

    This shows the three included tools, as described earlier.

  2. Display the tools included in the Verify - supplementary research tool to see the range of issues this tool searches for, as follows:

  3. Display the tools included in the Verify - false positives categorization tool in the same way.

  4. Click OK to run the tool Verify - all research.

    If necessary, click Yes to create the worksheet.

    This runs all the included tools, one after the other, and takes one or two minutes, depending on the power of your machine.

6.7 Reviewing the Data Items in the Worksheet

The worksheet now contains all the potentially date-related problems. These are the points of interest.

From now on, you use the worksheet to manage and track your work, recording in it your decisions and information concerning individual points of interest, such as why it was added to the worksheet or why it is not a problem after all. This provides an audit trail and enables you to revisit earlier decisions if necessary.

The worksheet is now displayed, as shown in Figure 6-1.

{short description of image}

Figure 6-1: Worksheet

  1. Click the Data items tab if it is not already displayed.

    This tab lists the data items that you have added to the worksheet. These are the data items of interest in the project. Among other things, the worksheet shows the location of each data item's definition, and who added the item to the worksheet and when.

  2. Notice that a count of 53 data items shows in the information bar towards the top of the worksheet.

  3. Some of the data items are in red, indicating that they do not have year types assigned to them in the Year Type column. The green data items do have year types.

  4. The Year Type column describes the type of date that the data item represents. It indicates, among other things, the data item's logical date format (such as yymmdd or ccyy) and its physical format such as numeric or alphanumeric as defined by its PICTURE. Usually, a data item holds data of only one logical format and only one physical format. The tutorial describes this more fully later.

  5. The Category column shows the categories that a data item falls into. Currently, the categories all start with R, which means that they indicate the reason why the data item is considered an issue. These categories were assigned by the various analysis tools, each tool assigning its own category. You can change the categories of a data item manually, if you discover that different or additional categories are appropriate.

  6. The Notes and Removal Reason columns, on the right, are for various types of information that you can record for each point of interest in the worksheet. The tutorials show how to use these later.

  7. Click RD-END-DATE and then click View Source Code.

    This splits the worksheet into two panes with the worksheet at the top and the source file containing the data item's definition at the bottom. If necessary, drag the bottom edge of the source view, so that you can see more source code. You can also drag the horizontal divider between the worksheet and the source view at any time.

  8. In the source view at the bottom, notice that the highlighted line is the definition of RD-END-DATE. Click RD-END-DATE in the source view and notice that 78:nn shows in the status bar at the bottom right of source view, where 78 indicates that the cursor is at line number 78 within the source file named at the bottom left and nn is the column number of the cursor.

    Notice that RD-END-DATE is defined as a group item with subordinate items RD-END-YY, RD-END-MM and RD-END-DD, indicating that it almost certainly holds a date.

  9. Explore how the data items and its subordinate items are used, as follows:

  10. Close the source view, by clicking {Source View} View Source Code again at the top of the worksheet.

The worksheet contains 53 data items.

6.8 Reviewing the Statements in the Worksheet

This section introduces the Statements tab of the worksheet. It describes the information available and shows how you can navigate the statements in the worksheet. Analyzing the statements thoroughly is covered in a later tutorial.

  1. Click the Statements tab of the worksheet.

    This tab lists the statements of interest in the project. Notice that a count of 119 statements shows in the information bar towards the top of the worksheet.

  2. Some of the statements are in blue and some in red. These colors are applicable if you are fixing, as is the Status column. These are described in more detail later in the tutorial Generating and Editing Fixes.

  3. Sort the statements into statement order with the ACCEPT statements at the top, by clicking in the Statements column heading.

  4. Right click the first ADD statement and click Properties. This shows a two pane window showing the statement's audit trail, in the form of:

    Close the Properties window.

  5. Display the data items involved in the first ADD statement, by right clicking that statement and clicking Show contained data items. This swaps to the Data items tab and shows just the two data items used in this statement.

  6. Right click the contained data item, YR-START-DATE, and click Show statements containing. This swaps back to the Statements tab and shows the four statements using this data item, one of which is the original ADD statement.

    There are more than just these four statements that use this data item but they are not of interest and are not in the worksheet. If you wanted to see those unwanted statements, you would use View Source Code as before.

  7. Redisplay all the statements in the worksheet again, by unchecking Filtered at the top of the worksheet.

The worksheet contains 119 statements.

6.9 Exploring Relationships

The Relationships tab of the worksheet shows the data items and their corresponding statements in a hierarchical view. Among other things, this view provides a reliable and quick way of removing data items and their corresponding statements at the same time.

In this section, you explore the relationships of the data items and statements in the worksheet.

  1. Go to the Relationships tab of the worksheet.

  2. In the Relations box at the top, choose Data item, then usage. This displays data items together with the statements that use them, providing those statements are in the worksheet. If a data item is not used in any worksheet statements, the data item does not appear here, even though the data item is itself in the worksheet, and appears in the Data items tab in its own right.

  3. Expand the data item P-START-YEAR to see the statements that use it, by clicking .

    This shows that P-START-YEAR is used in five statements: two ADDs, one IF, one PERFORM and one SUBTRACT.

  4. Make sure that the Format column is on view, by shrinking the Item and Location columns as necessary.

    The Format column shows that there are two usages for the first ADD statement involving P-START-YEAR and three usages for the other statements. This means that there are two data items in the worksheet that are used in the first ADD statement and three data items used in each of the other statements.

  5. To confirm the number of usages, click the PERFORM statement and click View Source Code. You can now see this statement fully and in context with the rest of the code.

  6. To display all the data items in the PERFORM statement, right click the statement in the worksheet and click Go to details to show the Statements tab. Then right-click the statement and click Show contained data items to view the relevant data items.

  7. Close the source view, by clicking {Source View} View Source Code again at the top of the worksheet.

6.10 Tips for Tailoring the Worksheet

There are a number of techniques for displaying the worksheet.

  1. Go to the Data items tab.

  2. Uncheck Filtered at the top, if not all the data items are displayed.

  3. Sort the data items into alphabetical order, by clicking the column heading Data item. You can sort the worksheet by any column, similarly.

  4. Widen the Data item column by dragging the divider between its column heading and the next column's heading. You can also press Ctrl + F2 to size all the columns to fit the information in them.

  5. Hide some of the columns that are not of interest in the tutorials, by right clicking in one of the column headings and clicking Customize columns. Select the columns Size, Worksheet, User, and Modified and click Remove and then OK.

    This hides these columns, but still maintains the information.

  6. Reorder the columns, so that the Location column is first, using Customize columns and Move up.

    Your selection of columns and their order stays set from one session to the next, until you change it again.

  7. Go to the Statements tab and hide the Modified, Owner, Program, Status, Type, User and Worksheet columns.

  8. Hide the information bar at the top of the worksheet, by clicking Options and unchecking Show information bar. For now, make sure the information bar is displayed, since you need it for the later tutorials.

6.11 Before Continuing

The worksheet should now contain 53 data items and 119 statements.

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. At the worksheet, click Save Save to File.

  2. Specify the filename, EndofChap6, for the backup worksheet for this chapter.

    If you already have a backup with this name, give a new name such as EndofChap6-1.

  3. When asked whether to make the saved worksheet your current worksheet, reply No, because the saved worksheet is a backup and you do not want to update it.

You can close SmartFind Plus, if you want to stop for now. You can then continue with the next tutorial some other time.


Copyright © 1999 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
Previous Loading an Application into the Database Analyzing Statements and Categorizing Them Next