Exploring and Documenting | Send Us Comments |
In this session, you use the Split Screen Editor to edit the source of your application. You use various other features of Revolve, including scripts and the REQL shell.
Please see the Tutorials Map to check that you have run all necessary previous sessions.
Having used Revolve to examine your application, and having decided what source changes are needed, you can of course use any editor to edit your source. If you have Mainframe Express you might like to use that.
You can if you wish use the Split Screen Editor in Revolve.
In this session you identify an unused paragraph in the project's source code, and see how to edit or delete it.
This session uses the project you created in the chapter Creating a Project.
To identify unused paragraphs you use a script:
The scripts shown generate various reports on the source code.
The script creates and displays a text report. It shows there are several unused paragraphs in BATCH2.CBL.
C100-CONVERT-SALES-DATE
The line for C100-CONVERT... is not "selected" in a color as in other Revolve windows. However, the status bar at the bottom of the Report shows it as selected.
The Split Screen Editor opens to show the contents of BATCH2.CBL with paragraph C100-CONVERT-SALES-DATE selected.
This deselects C100-CONVERT-SALES-DATE's, so you can see it is highlighted in yellow. Yellow indicates unnecessary source code identified by a script. If you were to open this source file in another tool or browser, these highlights would be shown.
Figure 8-1: Result of Unused Paragraph Report in the Split
Screen Editor
If the source is not highlighted in this way, click Options on the Split Screen Editor's tool bar, then check Show highlights and click OK.
The Split Screen Editor returns to the source for C100-CONVERT-SALES-DATE, and the paragraph is selected.
The unused paragraph has been removed.
We have not saved the updated source file - we will now look at another way of making this edit.
The source for BATCH2.CBL is displayed in the Split Screen Editor. Let's find our unused paragraph named C100-CONVERT-SALES-DATE.
The Search and Replace dialog box appears.
The unused paragraph is shown still highlighted in yellow. You can modify the paragraph, replace it with something else by using the Search and Replace dialog box, or leave it alone in the source because it is not causing problems.
If you do want to leave the unused paragraphs, you may want to remove the highlighting:
The Shell tool is invoked. This is a command line interface that you can use to type Revolve Query Language (REQL) commands, typically for batch analysis and administrative tasks. Further information on REQL is contained in the Revolve User's Guide.
clearHighlights("all");
in the Shell and press Enter.
This removes highlighting from all highlighted sources.
You can also make multiple changes in a single operation. For example, you can change the names of data items or paragraphs throughout the source file or even throughout the application.
To replace the string "GAME" with "ACTIVITY" in data-names:
The source code of BATCH1.CBL is displayed and selected in the Split Screen Editor.
Figure 8-2: Source code for BATCH1.CBL in the Split Screen
Editor
The Search and Replace dialog box opens.
Ensure that Proper Name is not checked.
WORKING-STORAGE is selected in the editor.
The Replace With field is enabled.
A Proper Name Replace prompt asks, "Replace this occurrence?" The occurrence is highlighted in the Split Screen Editor window.
The first highlighted item is the definition. The subsequent items are usages.
You are notified that the one definition was replaced and that all four subsequent usages were also replaced. The columns should all be aligned because of step 12.
In this session you:
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.
Exploring and Documenting | Send Us Comments |