Chapter 2: 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.

You need to work through this tutorial before you do any of the tutorials in the Help. See the topic Revolve Tutorials for information about the order in which to do the remaining tutorials.

Overview

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

Preparation

If you have Revolve open, close it by clicking Project > Exit or its Close Window 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 Close Window button.

Decide on which drive you will put your Revolve project folder for the Sample demo. It can go anywhere - it doesn't need to be related to the folder where the source of the demo is. You will create the folder 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 samples (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 work through all the sessions.

Starting Revolve

A wizard helps you quickly and easily create a new project or open an existing one. It takes you through the steps of creating a project, adding components to it, adding search directories, and building the project.

To start Revolve:

  1. On the Windows desktop, click Start > Programs > Micro Focus Revolve > 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.

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.

Every time you open Revolve, you can choose whether to create a new project, open a recently-used project, or open any other existing project. We will create a new project.

  1. Select the Create a New Project radio button and click OK.

    The New Project Wizard appears and guides you through the process of creating and populating a new analysis project.

  2. Click Next.
  3. Navigate to where you want to create your project folder for this demo, using Browse if necessary. Call it Sample.

    The project name automatically has .prj appended to it. The path to this project is samples\sample\sample.prj.

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

  4. Click Next to create the project.

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

  5. You are asked if you want to change the default configuration options applied to this project. You do this only if you are opening a project created using an earlier version of Revolve. Ignore this button and click Next.
  6. Click Add Components.
  7. In the Drives list, select the drive where Revolve is installed. Make sure Filter is set to *.* and Type to automatic.
  8. In the list of folders, navigate to samples\sampleapp.

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

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

  9. Select the cicstbl and jcl folders.

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

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

    The JCL and CICSTBL components reference COBOL and copybook files, which, in turn, have online 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.

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

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

  12. Similarly, select Copylib and set Type to copybook. Click Add Search. Click OK on the Add Complete message.
  13. Similarly, set the search path for control-card file types to the ctlcard folder, and for BMS file types to the bms folder.
  14. Click Done.
  15. Click Next.
  16. Make sure Start the analysis database build process is checked, and click Finish.

    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.

  17. 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.

The Revolve IDE is now displayed. 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.

The Project Manager window is open within the Revolve IDE. This is where you add and delete project components, create subprojects and set component level parameters.

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.

There are now eleven 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.

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 was just the Project Manager window.

    You can't close a project by clicking its Close 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 and the Project Manager are opened.

  3. Put your mouse pointer on Add Components 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.

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 Expand Completely .

    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 2-1.

    Report on Missing Copybook EXTRADD

    Figure 2-1: 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.

Correcting the Errors

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

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

    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 to be removed from the project you would have to do so explicitly using the Project Manager.

  3. Click Window > Close All Windows.

Summary

In this session you:

Before Continuing

The Sample project you created is used in some tutorials in the Help.

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

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

Go to the Tutorials Map and choose which session to go on to next.

Comments on the books? Click Send Us Comments.


Copyright © 2006 Micro Focus (IP) Ltd. All rights reserved.