FIND and CHANGE
The ISPF editor commands for finding text and replacing it, typed on the command line.
Also written FIND, CHANGE, RFIND, RCHANGE, CHANGE ALL, PF5
FIND and CHANGE are the editor's search and replace commands. FIND ACCT-NO, or F ACCT-NO for short, moves the cursor to the next place the text appears. RFIND repeats the last FIND, and is usually on PF5, so you press PF5 to go from one match to the next.
CHANGE replaces text. C OLD-NAME NEW-NAME changes the next match. Add ALL to change every one in the member: C OLD-NAME NEW-NAME ALL. RCHANGE, often on PF6, repeats the last change.
Both commands take options. FIRST, LAST and PREV choose which match. WORD matches only whole words. A pair of column numbers limits the search, such as 8 72 for COBOL code. Text in quotes with a C in front, like C'Total', must match exactly, upper and lower case included.
A useful habit is to check before changing everything. X ALL hides every line, then F text ALL shows only the lines that match. You can then see what a CHANGE ALL would affect before you run it, and type UNDO if a change goes wrong.
Where can I learn this hands-on?
Right here, at ZedBank. You take a junior job at a simulated bank and learn each part of the work by doing it, with Zed beside you. There's nothing to install.
Start at ZedBankRelated
- ISPF editorThe full-screen text editor used to write and change JCL, COBOL, REXX and anything else held in a dataset.
- Line commandA short command typed next to one line or item on an ISPF screen, as opposed to a primary command typed on the command line.
- PF keysThe function keys F1 to F24, which carry the main actions on a mainframe screen: help, exit, save, page up and down.
- SRCHFORThe ISPF search utility that finds a string in every member of one or more libraries.
- ISPFThe full-screen, menu-driven workbench most people use to do their day-to-day work on z/OS.