Restriction: You can only replace data with data of the same length.
From the
Micro Focus Data File Tools window, click
File > Open > File, or click
(Open File).
The
Open dialog box appears.
Navigate to the required data file, then click
Open.
The
Open Data File dialog box appears.
If you are applying a record layout, click
Browse to the right of the
Structure File (optional) field, then use the
Open dialog box to navigate to and select the structure (.str) file that contains the layout.
Click
Open Shared (to open the file in read-only mode) or
Open Exclusive (to open the file in edit mode).
The file is displayed on its own tab in the main window.
On the
Search menu, click
Find/Replace.
The
Find/Replace dialog box is displayed.
To display the equivalent hexadecimal values of your find/replace criteria, select
Hex.
Do one of the following:
Find data in the file:
Ensure that your keyboard is not in Overwrite mode; if it is, press
Insert to toggle to Insert mode. If the Find field is blank, Overwrite mode will only allow you to enter text for a single character
in length.
In the
Find field, click
, select one of the following input types, and then enter the find text into the field:
all - search each entire record.
in offsets - search a range of positions within each record. When you select this option, two additional fields are displayed in which
you enter the offset to start searching and the number of positions on from that in which to search.
in field - (only available if the file is using a layout) search a particular field in each record. When you select this option, an
additional field is displayed in which you select the field in which to search.
Click
Find Next to immediately jump to the first occurrence after the currently selected record, or click
Find All to highlight all occurrences in the file.
Replace data in the file:
Ensure that the file is in Exclusive mode: double-click
(Switch to Exclusive Mode).
Input the Find criteria, as detailed above, and then enter the replacement text in the
Replace with field.
click
Replace to replace the next matching text, or click
Replace All to replace all matching text at once.
An indicator showing the number of replacements is displayed.
Note: If you are searching and replacing DBCS characters, you must use the Hex pane: select
Hex, and then enter the hexadecimal values directly into the Hex pane.