z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Repeating the FIND, CHANGE, and EXCLUDE commands

z/OS ISPF Edit and Edit Macros
SC19-3621-00

The easiest way to repeat FIND, CHANGE, and EXCLUDE without retyping them is to assign those commands to function keys. The defaults are:
F5/17
RFIND
F6/18
RCHANGE

The search begins at the cursor. If the cursor has not moved since the last FIND, CHANGE, or EXCLUDE command, the search continues from the string that was just found. Instead of retyping string1, you can type an asterisk to specify that you want to use the last search string. If you decide to type RCHANGE or RFIND on the command line instead of using a function key, position the cursor at the desired starting location before pressing Enter.

All three commands share the same string1. Therefore:
FIND ABC
followed by:
CHANGE * XYZ
first shows you where ABC is, and then replaces it with XYZ. However, you can do this more easily by typing:
CHANGE ABC XYZ
Then press F5/17 to repeat FIND. The editor finds the next occurrence of ABC. You can either press F5/17 to find the next ABC, or F6/18 to change it. Continue to press F5/17 to find remaining occurrences of the string.

The previous value of a search string, specified by an asterisk or by use of RFIND or RCHANGE, is retained until you end your editing session.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014