The Project Manager Replace (All) function searches for the specified string throughout all event and COBOL procedures belonging to the selected part of the project tree, and replaces it with the replacement string. You can replace all occurrences or have the Replace function step you through each occurrence of the specified string.
The Replace dialog is shown and explained below:
The Replace dialog is made up of three panes: the Control pane, the Target pane and the Result pane. The contents of these panes are described below.
Control Pane
The control pane provides the functions for specifying the type and range of the Replace and for controlling the Replace operation. You specify the replace range and method of handling the results before you start the Replace operation.
Currently there is only one type of replace supported - replacing text - so the selection is disabled. This will be expanded in future releases.
The drop down list shows the name of the project being searched. This field is disabled.
Check this box to have Replace search objects that are on branches of the selected object in the project tree.
Select this box if you only want to search objects that are on branches of the selected object and not the selected object. The check box is disabled if "Includes children of the selected object" is not selected.
Select this button if you want Replace to stop each time it makes a find.
Select this button if you want Replace to search through the whole range, replacing all matching strings, and displaying results in the Result pane.
The Replace button initiates the Replace operation, locating the first string that matches the "Find what" string. The Replace operation continues until all matching strings have been found or until the Cancel button is pushed.
The Close button closes the Replace dialog. It is disabled during a Replace operation.
The Replace and Next button is enabled when a Replace one-by-one operation starts. It replaces the currently located string with the "Replace what" string, registers the result of the Replace in the Result pane and searches for the next occurrence of the "Find what" string.
The Skip button is enabled when a Replace one-by-one operation starts. It does NOT replace the currently located string, does NOT register anything in the Result pane, and searches for the next occurrence of the "Find what" string.
The Replace All button is enabled when a Replace one-by-one operation starts. It causes the Replace operation to search for all remaining occurrences of the "Find what" string, replace those strings with the "Replace what" string, and display the results in the Result pane.
The Cancel button is enabled when a Replace one-by-one operation starts. It terminates the Replace operation so that you can start a new Replace operation or close the Replace dialog.
Target Pane
Specify the string for which Replace should search in the "Find what" combo box. You can either select a string from the drop down list of strings used in previous searches or enter a new string.
Specify the string that Replace should use to replace "Find what" strings. You can either select a string from the drop down list of strings used in previous replaces or enter a new string.
Check the "Match case" box if you only want to find strings that exactly match the case of the characters in the "Find what" string.
Result Pane
The Result pane lists the locations where strings have been replaced. You can double-click on the position of a result item to see the changed text in the PowerCOBOL Editor or use the pop-up menu described below.
The results are listed with:
The location of the replaced string in the project. Includes starting and ending row and column numbers.
Displays the contents of the line containing the "Find what" string, before the string is replaced.
Results Pane Pop-up Menu
If you right click on the position of a result item Replace displays a pop-up menu with the following functions:
Displays the procedure containing the selected line in the PowerCOBOL Editor with the location of the original string highlighted.
Copies the characters that now occupy the location of the original string to the clipboard and deletes those characters from the selected location in the procedure.
Copies the characters that now occupy the location of the original string to the clipboard.
Deletes the characters that now occupy the location of the original string from the selected location in the procedure.
Note
These functions only work if you are using the PowerCOBOL Editor.
Caution
Updates to procedures after a Replace operation has been executed may invalidate the Replace result positions so be sure you have the correct text selected before using these operations.