ISPF Edit commands: X ALL, FIND ALL, FLIP, DELETE ALL NX and block line commands
The ISPF Edit commands people look up most: show only matching lines with X ALL and FIND ALL, delete the rest, copy a member in, and use CC, MM and DD blocks.
ISPF Edit has two kinds of command. Primary commands go on the Command ===> line. Line commands go over the line numbers on the left. Both take effect when you press Enter.
Show only the lines that contain a string
X ALL;FIND ALL 'text'
X ALL (EXCLUDE ALL) hides every line behind a dashed n Line(s) not Displayed line. FIND ALL then searches all lines and shows every line it finds. The semicolon runs the two commands one after the other. Variations:
FLIPswaps them: the lines that do not contain the string are shown, the others hidden.RESET(orRESET EXCLUDED) shows all lines again.ForLtyped over a dashed line shows the first or last hidden line of that block.
Act on shown or hidden lines
Many commands take X (only excluded lines) or NX (only lines that are not excluded):
DELETE ALL NX delete every line you can see
DELETE ALL X delete every hidden line
CHANGE 'old' 'new' ALL NX
As a precaution there is no plain DELETE ALL: add X, NX or a range of labels. DELETE ALL .ZFIRST .ZLAST deletes every line. To keep only the lines that contain a string: X ALL;FIND ALL 'text', then DELETE ALL X.
Find and change
FIND 'text' next occurrence
FIND 'text' ALL all of them, with a count
CHANGE 'old' 'new' ALL
PF5 repeats the last FIND (RFIND) and PF6 the last CHANGE (RCHANGE), from the cursor position. Put & in front of a primary command, as in &CHANGE ALL ABCD 1234, to keep it on the command line after it runs.
Copy another member or data set in
COPY member AFTER .ZLAST
COPY 'USER.OTHER.DATA(MEMBER)'
Without AFTER or BEFORE and a label, type A (after) or B (before) over a line number to show where it goes. COPY on its own opens a panel to choose the data set.
Line commands
| Type | Does | |---|---| | I or I5 | insert 1 or 5 blank lines below | | D or D3 | delete this line, or 3 lines | | R | repeat the line | | C or M then A or B | copy or move a line after or before another | | CC ... CC, MM ... MM, DD ... DD, RR ... RR, XX ... XX | the same for a block: mark the first and last line | | X or X10 | hide this line, or 10 lines |
If a line command is typed wrong, RESET clears all pending line commands before you press Enter.
Related
- ISPF navigation basics
- ISPF Edit typing overwrites text: Insert key, NULLS ON and full lines
- Search all members of a data set in ISPF, SRCHFOR and SFE
- Show hexadecimal in ISPF Edit and Browse
- ISPF KEYS and PFSHOW: see and change what PF1 to PF24 do
- ISPF EDIT AUTOMATIC RECOVERY panel after a dropped session: continue, DEFER or CANCEL