Useful ISPF Commands

The following table describes some of the most used ISPF commands that may come very handy when editing datasets or members the mainframe:

Edit Primary Commands
CHANGE string1 string2 Changes first occurrence of string1 with string2. CHANGE can also be used as C
CHANGE ALL string1 string2 Changes all occurrences of string1 with string2
CHANGES LAST string1 string2 Changes string1 with string2, starting at the bottom of the data and searching backward to find the last occurrence of string1
CHANGE PREV string1 string2 Changes string1 with string2, starting at the current cursor location and searching backward to find the previous occurrence of string1
CHANGE NEXT string1 string2 Changes string1 with string2, starting at the first position after the current cursor location and searching ahead to find the next occurrence of string1
CHANGE PREFIX string1 string2 Changes string1 with string2, locating string1 at the beginning of a word
CHANGE SUFFIX string1 string2 Changes string1 with string2, locating string1 at the end of a word
CHANGE WORD string1 string2 Changes string1 with string2 providing string1 is a word
CHANGE X string1 string2 Changes string1 with string2 scanning only the lines that are excluded from the display
CHANGE NX string1 string2 Changes string1 with string2 scanning only the lines that are not excluded from the display
C string1 string2 col1 col2 Changes string1 with string2 between column 1 and column 2
COPY data Copies a sequential data set, a member of a partitioned data set, or a z/OS UNIX file into the data being edited
COPY data AFTER label Copies data after the line with the specified label
COPY data BEFORE label Copies data before the line with the specified label
CREATE data Creates a member of a partitioned data set, a sequential data set, or z/OS UNIX file from the data you are editing. Use CREATE or CRE.
CREATE data label1 label2 Creates a member, dataset or UNIX file. Label1 and label2 identify the start and end of the group of lines which are added to the new member.
CREATE data .zf .zl Creates a member, dataset or UNIX file of the entire member being edited. .ZF sets a label for the first line and .ZF for the last line.
DEL ALL Deletes all the lines from the data you are editing
DEL X Deletes all the lines that are excluded
DEL NX Deletes all the lines that are not excluded
DEL label1 label2 Deletes the group of lines defined from label1 up to label2
EDIT member Edits another sequential data set, partitioned data set member, or z/OS UNIX file during your current edit session
EXCLUDE ALL Hides from view all the lines of the member being edited and replaces them with a dashed line. Use EXCLUDE or X
EXCLUDE string Hides from view the first line that contain a search string
EXCLUDE string ALL Hides from view all the lines that contain the search string
EXCLUDE string PREV Hides from view the line that contains the search string before the cursor
EXCLUDE string NEXT Hides from view the line that contains the search string after the cursor
EXCLUDE string PREFIX Hides from view the line that contains the search string as a prefix from a word
EXCLUDE string SUFFIX Hides from view the line that contains the search string as a suffix from a word
EXCLUDE string WORD Hides from view the line that contains the search string as an all word
EXCLUDE string col1 col2 Hides from view the line that contains the search string between col1 and col2
FIND string
Finds the specified string (ex: F REVIEW). F can be used instead of FIND.
FIND string NEXT  Finds the next occurrence of the string in regards to where the cursor is positioned
FIND string PREV Finds the previous occurrence of the string in regards to where the cursor is positioned
FIND string FIRST  Finds the first occurrence of the string
FIND string LAST Finds the last occurrence of the string
FIND string ALL Finds all the occurrences of the string
FIND string SUFFIX  Finds the string as a suffix of a word
FIND string PREFIX  Finds the string as a prefix of a word
FIND string WORD Finds the string as a all word
FIND string col1 col2 Finds the string between column 1 and column 2 (ex: F HELLO 20 40)
.LABEL Defines a label on a line (ex: .HERE)
LOCATE line Locates line number n (ex: L 20, LOC 20, LOCATE 20)
LOCATE label Locates the line with the specified label
MOVE data Moves a sequential data set, member of a partitioned data set, or z/OS UNIX file into the data being edited
MOVE data AFTER label Moves data after the line with the specified label
MOVE data BEFORE label Moves data after the line with the specified label
REPLACE data Replaces a sequential data set, member of a partitioned data set, or z/OS UNIX file with data you are editing. If the member , or z/OS UNIX file you want to replace does not exist, the editor creates it. User REPLACE or REP.
REPLACE data label1 label2 Label1 and label2 identify the start and end of the group of lines to replace the member or data set
RESET Removes the messages that appear in the editing area. Use RESET or RES.
SAVE  Saves all the changes made
SORT Sorts ascending all the data in the member being edited
SORT A Same as SORT
SORT D Sorts descending all the data in the member being edited
SORT X Sorts only the lines that are excluded
SORT NX Sorts only the lines that are not excluded
SORT col1 col2 Sorts data by the content from col1 to col2
Edit Line Commands
UC Changes the text on the line from lower case to upper case
UCn Changes the text on the ‘n’ lines starting at this one to upper case
LC Changes the text of the line from upper case to lower case
LCn Changes the text on the ‘n’ lines starting at this one to lower case
C Copies the content of the line
Cn Copies the content of the line ‘n’ times
CC Copies the block of lines starting with the first CC command and ending with the second CC command
M Moves the content of the line
Mn Moves the content of n lines starting at this one
MM Moves the block of lines starting with the first MM command and ending with the second MM command
A Places the copied/moved lines after this line
An Repeats the copied/moved lines n times after this line
Places the copied/moved lines before this line
Bn Repeats the copied/moved lines n times before this line
D Deletes the line
Dn Deletes n lines starting at this line
DD Deletes the block of lines starting with the first DD command and ending with the second DD command
X Excludes this line
Xn  Excludes n lines starting at this line
XX Excludes the block of lines starting with the first XX command and ending with the second XX command
R Repeats this line
Rn Repeats n lines starting at this one
RR Repeats the block of lines starting with the first RR command and ending with the second RR command
RRn Repeats the block of lines starting with the first RR command and ending with the second RR command ‘n’ times
O Overlays line content with copied/moved line
On Overlays ‘n’ lines starting at this one with copied/moved lines
OO Overlays the block of lines starting with the first OO command and ending with the second OO command with copied/moved lines
S Shows one line of the excluded text
Sn Shows n lines of the excluded text
F Shows the first line of the excluded text
Fn Shows the first n lines of the excluded text
L Shows the last line of the excluded text
Ln Shows the last n lines of the excluded text
I Insert one line after this line
In Insert n lines after this line
( Shifts the line left 2 columns
(n Shifts the line left n columns
((  Shifts the block of lines starting with the first (( command and ending with the second (( command 2 columns to the left
((n Shifts the block of lines starting with the first (( command and ending with the second (( command ‘n’ columns to the left
) Shifts the line right 2 columns
)n  Shifts the line right ‘n’ columns
)) Shifts the block of lines starting with the first )) command and ending with the second )) command 2 columns to the right
))n Shifts the block of lines starting with the first )) command and ending with the second )) command ‘n’ columns to the right
< Data shifts the line left 2 columns
<n Data shifts the line left n columns
<<  Data shifts the block of lines starting with the first << command and ending with the second << command 2 columns to the left
<<n Data shifts the block of lines starting with the first << command and ending with the second << command ‘n’ columns to the left
> Data shifts the line right 2 columns
>n  Data shifts the line right ‘n’ columns
>> Data shifts the block of lines starting with the first >> command and ending with the second >> command 2 columns to the right
>>n Data shifts the block of lines starting with the first >> command and ending with the second >> command ‘n’ columns to the right
COLS Displays a ruler with individual columns marked
MASK The MASK line command displays the =MASK> line. On this line, you can type characters that you want to insert into an unformatted data set or member. These characters, which are called the mask, are inserted whenever you use the I (insert), TE (text entry), or TS (text split) line commands, or when you edit an empty data set.
BNDS The BOUNDS (BNDS) line command displays the boundary definition line
TABS When you type TABS in the line command field, =TABS> is displayed along with any previously defined tab positions.
MD The MD (make dataline) line command converts ==MSG>=NOTE==COLS>, or ======(information) lines to data so they can be saved as part of your data set.
MDn Converts ‘n’ number of lines
TE The TE (text entry) line command provides one very long line wrapped around many lines of the display to allow power typing for text entry. The editor does the formatting for you.
TEn Applies the TE to ‘n’ lines starting at this line
TS Splits the text line at the cursor
TSn Splits the text line at the cursor and inserts ‘n’ lines
TF Flows the text to the end of paragraph which is either a blank line or an indentation
TFn Flows the text using the column number ‘n’ as the right margin
Edit Profile
AUTOSAVE ON Automatically save changes when using the PF3 key
AUTOSAVE OFF Turns this feature off
AUTOLIST ON Generates a source listing in the ISPF list data set for eventual printing when you end an edit session in which you changed and saved data
AUTOLIST OFF Turns this feature off
BOUNDS col1 col2 Sets the left and right boundaries and saves them in the edit profile. Use BOUNDS or BND.
CANCEL Cancels (ignores) all the changes and exit. The changes are not saved. Use command CANCEL or CAN
HILITE ON Sets program colouring on
HILITE OFF Turns this feature off
HILITE AUTO Allows ISPF to determine the language
HILITE ASM Highlights the data as Assembler
HILITE C Highlights the data as C
HILITE COBOL Highlights the data as Cobol
HILITE HTML Highlights the data as HTML
HILITE JCL Highlights the data as Job Control Language (JCL)
HILITE PANEL Highlights the data as ISPF Panel Language
HILITE PASCAL Highlights the data as Pascal
HILITE PLI Highlights the data as PL/I
HILITE REXX Highlights the data as Rexx
HILITE SKEL Highlights the data as ISPF Skeleton Language
HILITE SUPERC Highlights the data as SuperC listing
HILITE XML Highlights the data as XML
PACK ON Saves data in packed format
PACK OFF Turns this feature off
TABS ON Turns tabs mode on, which means that logical tabs can be used to break up strings of data. This is the default operand.
TABS OFF Turns this feature off
PROFILE Shows current profile settings. Can use PROFILE or PROF
PROFILE profilename Switches to a different profile or creates a new profile
PROFILE LOCK Saves the changes made to the edit profile
STATS ON Keeps automatic statistics
STATS OFF Turns this feature off
Edit Sequence Numbering
AUTONUM ON Resequences line numbers when saved
AUTONUM OFF Turns this feature off
NUMBER ON
Turns line numbering on
NUMBER OFF
Turns this feature off.
NUMBER STD
Sets number on STD
NUMBER COBOL
Sets number on COBOL
NUMBER STD COBOL
Sets number on STD and COBOL
RENUM  Renumbers the lines starting at 100 and incrementing by 100. RENUM also sets NUMBER ON.
RENUM STD  Sets number on STD
RENUM COBOL Sets number on COBOL
RENUM STD COBOL Sets number on STD and COBOL
UNNUM Turns off number mode and replaces the line numbers with blanks
Edit Display Modes
CAPS ON Automatically converts all lowercased entered into upper case
CAPS OFF Turns this feature off
HEX ON Turns Hexadecimal display ON
HEX OFF Turns this feature off
NULLS ON Trailing blanks are sent to the screen as null characters
NULLS OFF Turns this feature off
Edit Automatic Recovery
RECOVERY ON Keeps a record of all the changes made during the editing session. Can use RECOVERY or REC
RECOVERY OFF Turns this feature off
UNDO Undoes the last modification done (for this to work RECOVERY must be ON)