Top
PowerCOBOL V11.0 User's Guide
FUJITSU Software

5.5.1 Using the PowerCOBOL Editor Find and Replace

You can locate and substitute characters or strings during edit sessions by using the Find and Replace commands. Select Find in the Edit menu to access the Find dialog box. You may optionally type a string in the Editor toolbar's find box and click on the toolbar find forward and backward buttons.

5.5.1.1 Find Dialog Box

Figure 5.13 The Find dialog box

The Find dialog box contains the following elements:

Find what

Enter the character or string to be searched for in this field.

Direction

Select the direction in which to conduct the search. Select the Down button to search from the starting position to the end of the procedure. Select the Up button to search from the starting position back to the beginning of the procedure.

Match Whole Word Only

Specify that the search is for the strings that match the entire string as a word and not as part of a longer word.

Match Case

Specify that the search is for the strings that match the sequence of upper and lower case letters in the original string.

For example, if you specify this option and are searching for the following string, 'aB', AB would not meet the search criteria.

Click on the Find Next button to initiate the search.

The cursor will move to the location in the current edit session where the string was found, or you will receive in informational dialog box indicating that the string was not found.

5.5.1.2 Replace Dialog Box

You can find and replace characters or strings using the Replace command. Select Replace in the Edit menu to access the Replace dialog box.

Figure 5.14 The Replace dialog box

The Replace dialog box is similar to the Find dialog box; however, it contains the following additional element:

Replace with

Enter the character or string that is to replace the original character or string. The maximum string length is 32 characters.

Click on the Find Next button to find the next occurrence of the string without replacing it.

Click on the Replace button to find the next occurrence and replace it with the new string.

Click on the Replace All button to find and replace all occurrences of the string.

The system will display a dialog box indicating your results.