The Find/Replace window provides numerous options to allow
for flexibility in replacing data.
If a match is found for the search criteria that was provided,
the data that was retrieved can be replaced with new data. There are
however some limitations to replacing data during a search:
Variable-length files:
- If the Replace With string is shorter than
the original string, and the edit type supports record length change,
the replace will complete successfully and the record length will
be reduced.
- If the Replace With string is longer than
the original string, and the edit type supports record length change,
the replace will complete successfully and the record length will
be increased.
Fixed-length files:
- If the Replace With string is shorter than
the original string, the replace will complete successfully and the
field will be padded with extra blanks to match the record length.
- If the Replace With string is longer than
the original string, the replace will fail unless there are enough
spaces in the field to accommodate the new string.
Choose from several methods to find and replace data based on the
criteria that you have defined.
- Find - Searches the data set and highlights
the next available match.
- Find All - Searches the data set for all
possible matches. When the search completes, the number of records
searched and the number of matches found are displayed and the first
available match is highlighted.
- Replace/Find - Searches the data set for
the next item matching the search criteria and replaces it with the
string defined in the Replace With field.
- Replace - Replace the currently selected
data with the string defined in the Replace With field.
- Replace All - Searches the data set for
all items matching the search criteria and replaces them with the
string defined in the Replace With field.
- Close - Closes the Find/Replace window.