PreviousThe Tutorials Start Here Analyzing Data ImpactsNext

Chapter 4: Using Revolve

In this session, you use Revolve to parse the source of an application to discover how its different source files are related. The results of this analysis are stored in a database that you will use in later tutorials.

This is the first session of the tutorials in the Getting Started book. You need to work through this before you do any of the others. See the chapter The Tutorials Start Here for information about the order in which you can do the tutorials.

4.1 Overview

The application used in this session is supplied with Revolve. It is installed in the \samples\revolve\sampleapp folder, and represents a simple order processing application. Supplied are the source files - COBOL sources, copyfiles, BMS maps, and files defining the CICS resources. In a real case you might have downloaded these from your mainframe.

4.2 Preparation

If you have Revolve open, close it by clicking Project > Exit (click Project on its menu and then click Exit on the pulldown menu that appears), or its button.

If you have the Setup window open - the one with the Install, Installation Notes, and Exit buttons - close it by clicking Exit or its button.

Decide which drive you will put your Revolve project folder for the Sample demo on. It can go anywhere - it doesn't need to be related to the folder where the source of the demo is. You will create it during this session. For convenience, we will assume in these sessions that you will create the project folders for all the demos in this book as subfolders of a folder called \projects (in showing paths and folder names in this book, we do not show the drive, as we don't know what drive you're using). This set of folders will eventually take up to about 2Mb disk space if you do all the sessions in the book.

4.3 Starting Revolve

To start Revolve:

  1. On the Windows desktop, click Start > Programs > MERANT Revolve TPS > Revolve.

    Some menu items may include version numbers - in this book we omit these numbers.

    You might get one or more dialog boxes warning that you don't have a full valid license. In these sessions we will ignore these warnings, but later you should load Revolve again and click Help on these dialog boxes for details of how to get a full license.

  2. If you got the license warnings, click OK and/or Yes to ignore them.

    If you already have a full license, you get a screen telling you what options you have installed. This disappears after a few seconds.

    When you first load Revolve you get a Welcome screen. Click Don't View Help Now. If Revolve appears full screen you may prefer to make it smaller by clicking  Restore. Revolve is shown in Figure 4-1.

    Figure 4-1: The Revolve IDE

    This is where all project windows, tools, views, browsers, and editing windows will be opened. You can change the size and shape of Revolve and its windows by dragging the edges and corners.

4.4 Creating a Project

A project is a file where Revolve keeps a note of all the files in your application and how they are related. You can see which files are included in a project by opening the Project Manager window. A project is very easy to create, and makes processing the application extremely quick and easy. On disk, a Revolve project is recognizable by the extension .prj.

The term project is also used to mean the entire structured set of files that make up the application - the project file, source files, data files, folders, and so on, and the dependencies between them.

The folder where you keep the project for an application is called its project folder. The application's other files can be anywhere, since the project contains pointers to them.

To create a project:

  1. Click Project > New.

  2. In the New Project window that appears, navigate to where you want to create your project folder for this demo, and use the button to create it. Call it Sample.

    In the examples in this book we assume you are creating project folders within \projects\sample. If you're not, please change the examples accordingly.

  3. Double-click your new project folder \sample to open it.

    All database files related to the project will be stored in this folder.

  4. Type sample.prj as the name of the project in the File name field, then click Create. (If this session has been run previously, you will be asked whether to overwrite the existing project. Click Yes.)

    So the path to this project is \projects\sample\sample.prj.

  5. Click No on the Add Components message.

    Typically you would click Yes and add your components. However, for the sake of understanding Revolve's functionality, we will add them later.

    Notice that the Project Manager window opens. (If not, click at the bottom of the Revolve desktop or click the Project > Manager.) This is where you add and delete project components, create subprojects and set component level parameters. At the moment there are no components displayed. You add them in the next section.

4.5 Adding Components to your Project

The Project Manager window is where all the source files in your project are listed. You don't have to add every one explicitly. Once you've added the top-level files, Revolve can find the rest by following links such as CALL and COPY statements, provided you tell it which folders to look in.

To add components to your project:

  1. Either click Projects > Add Components, or click the Add Components button on the Project Manager's toolbar.

  2. In the Drives list, select the drive where Revolve is installed. Make sure Filter is set to *.* and Type to automatic.

  3. In the list of folders, navigate to \samples\revolve\sampleapp.

    If you need to go up to a parent folder, double-click the  icon at the top of the list.

    The folder \samples\revolve\sampleapp contains the source files of the demo. They are in subfolders organized by type.

  4. Select the cicstbl and jcl folders.

    (To select more than one folder at once, hold down Ctrl while you click them.)

  5. Click Add to add all the files in these two folders to the project. Click OK on the message telling you how many files have been added.

  6. Click Done, then click No on the New Components prompt.

    Typically you would click Yes and start the database load process. However, for the sake of understanding Revolve's functionality, we will start it later.

    You have added components to your project.

    Figure 4-1: Files in the Project Manager

    The files you added to the project are organized by type in the Project Manager.

  7. Double-click the fct files folder.

  8. Press the down arrow key to select online.fct, then click the View Source Code button.

    The Split Screen Editor displays the source code of online.fct.

4.6 Adding Search Directories

The JCL and CICSTBL components reference COBOL and copybook files, which, in turn, have on line references to BMS and control-card files. The next step is to add search directories so Revolve can find the referenced files.

The Automatic Component Locator (ACL) uses search paths to find files according to type.

Now add some search paths for your project:

  1. Click .

  2. Select the cobol folder. Then use the dropdown list next to the Type field to set this field to cobol. Then click Add Search. Click OK on the Add Complete message.

    This tells Revolve to look in folder \samples\revolve\sampleapp\cobol for any COBOL source files referenced in the application.

  3. Similarly, select Copylib and set Type to copybook. Click Add Search. Click OK on the Add Complete message.

  4. Similarly, set the search path for control-card files to the ctlcard folder, and for BMS files to the bms folder.

  5. Click Done.

  6. To view the search paths that you just defined, click Utilities > Options, then click the Search Directories tab.

  7. Click Cancel.

4.7 Building the Project

To build the project:

  1. Either click Project > Make, or click the Make button on the Project Manager's toolbar.

    Revolve parses the source of the application to discover its structure, creates the database describing the application and stores in it a detailed description of the structure.

    The parser displays information about its progress. Notice how the Phase reading indicates that the code is passing from Phase 10 to Phase 6. This is the Automatic Component Locator (ACL) connecting your components to the project through search paths.

  2. Click OK on the message saying the project is up to date.

    This message means the creation of the project and parsing of the application source has been completed.

    There are now seven entries in the Project Manager, showing the types of file in the project. The number in parentheses by each shows how many of that type there are.

4.8 Using Project Windows

Before continuing, we'll illustrate some basic points about using projects and their windows.

  1. Click Project > Close.

    All the project's open windows close. In this case there is just the Project Manager window.

    You can't close a project by clicking its g button. Doing so closes its window, but the project remains loaded.

    You don't need to save a Revolve project. It is saved automatically whenever you update it.

  2. Click Project > \sample\sample.prj.

    The Project menu includes entries to re-open projects opened recently. To open a project not on this list you would use Project > Open.

    The project is opened, but nothing visible happens.

  3. Click Project > Manager to open the Project Manager.

  4. Put your mouse pointer on on the toolbar without clicking, and wait a moment.

    The purpose of the button, "Add Components", is displayed. This is called a tooltip. Tooltips are available in many parts of Revolve. If you want to know what anything in Revolve is - whether button, field, or whatever - it's worth doing this to see if a tooltip appears. Moving the pointer off the button makes the tooltip disappear.

4.9 Checking the Project is Complete

An important part of creating a project is checking that all necessary parts of the application are present.

  1. Click Project > Complete.

    The Complete Project window opens. This lists all the types of error that Revolve could have found when parsing the project.

  2. Double-click each entry in the Complete Project window.

    A number appears by each entry showing how many errors of that type were found. Where this is not zero the list expands to list the individual errors.

  3. Right-click on the line Copybook EXTRADD not found, and click Information on the popup menu.

    This invokes the Imports browser.

  4. Select the EXTRADD folder, then click the Expand Completely button .

    This shows that the missing copybook is used in project components ONLINE2.CBL and ONLINE3.CBL. This link to the source files is the first step in finding out more about EXTRADD.

  5. Click Tools > Scripts.

    This displays a list of supplied scripts.

  6. Double-click Parsing Problems, then select List Errors and Warnings and click Run.

    The script displays a Report window with the beginning of its report, then stops to display the Choose Components dialog box.

  7. Select ONLINE2.CBL and ONLINE3.CBL, then click OK.

    The resulting report shows the errors or warnings in the two programs ONLINE2.CBL and ONLINE3.CBL. You may need to scroll the Report window to see the entire report. It is shown in Figure 4-2.

    Figure 4-2: Report on Missing Copybook EXTRADD

    Since there are no undefined variables reported, you can conclude that ONLINE2.CBL and ONLINE3.CBL no longer use the information in the EXTRADD copybook.

  8. Close the Report window, Scripts window, and Imports browser.

    At this point the information that was discovered can be added to the Revolve database. Leave the Complete Project window open for the next exercise.

4.10 Correcting the Errors

You now add to the database the information that the absence of EXTRADD is not a problem:

  1. In Complete Project, select the line Copybook EXTRADD not found, then click the Fix button .

    Fix enables you to resolve identified problems. In this case, the most appropriate action is to define the copybook as unavailable.

  2. Ensure Import is not available is selected, then click OK.

    The error message is removed from the Complete Project window. The file EXTRADD is not deleted from the list of files in the project. If you wanted it removed from the project you would have to do so explicitly using the Project Manager.

  3. Click Window > Close All Windows.

4.11 Summary

In this session you:

4.12 Before Continuing

The Sample project you created is used in some later sessions in this book.

If you want to take a break before going on to the next session, you can close the project, by clicking File > Close Project. You can't close a project by clicking its g button. Doing so closes its window, but the project remains loaded.

You can close Revolve, with or without closing the project, by clicking either File > Exit or its g button.

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.

PreviousThe Tutorials Start Here Analyzing Data ImpactsNext