You are on page 1of 6

Mainframe Refresher Muthu

ISPF-TSO

ISPF (Interactive Spool Productivity Facility) is a popular editor in the mainframe


platform. There are two kinds of commands that can be entered in edit/view panel of
ISPF editor.

They are:
1. Primary Commands that can be entered in the Command Line.
2. Line Commands that can be entered in the line(s).

Mastering in these commands will be highly helpful in analyzing/developing


application programs.

Primary Command Meaning


KEYS Displays the PF Keys and its definition for that panel
PFSHOW Shows PF Keys at the bottom of panel. To OFF this option
enter PHSHOW OFF.
RESET Reset the display of the dataset
X ALL Exclude all the lines
COLUMNS/COLS / COLS Display a ruler at the top of the screen. This can be
ON/COL removed by COLS OFF or RESET.
TOP/BOT Move to the TOP or BOTTOM of the file.
HEX Displays the data in Hexadecimal mode. Type HEX OFF to
come back to normal display. Highly helpful for reading
computational fields and low-values.
SWAP Switch between split screens.
SWAP LIST Lists the available screens.
CUT With C or CC line command, this will copy the lines to
temporary storage.
CUT .A .B will cut the lines in between the labels A & B.
CUT DISPLAY Display the lines already cut.
CUT APPEND Appended the lines to the lines already cut.
PASTE Paste the already cut lines. Line commands A or B should
be used before issuing paste to indicate after or before
which line this paste should occur.
SCRNAME XXXXX The current screen is named as XXXXX. If you are using
multiple split screens, then you can come back to this
screen by SWAP XXXXX line command. Its good
convention to name the screens with the purpose so that
you can easily come back. By default the screens are
named with numbers.
LOCATE line- Locates the line-number or the label. Labels can be
number/Label established in any line by the line command
.labelname.
RECOVERY ON With RECOVERY on, UNDO line command will revert the
RECOVERY OFF last recent change made in the edit/view session. REC
RECOVERY OFF OFF will off the recovery option and UNDO Unavailable
UNWARN message will appear in the first line. REC OFF UNWARN is
UNDO same as REC OFF but there won’t be any UNDO
unavailable warning message.
F ‘Musa’ Locates the next ‘Musa’.
F ‘Musa’ 1 Locates the next ‘Musa’ in the first column

www.mvsquest.com ISPF Page:1


Mainframe Refresher Muthu

F ‘Musa’ 1 30 Locates the next ‘Musa’ that appear anywhere between


column 1 and 30.

The above commands will do the find from the current


cursor position and place the cursor over the string found.
F ‘Musa’ ALL Independent of cursor position, this will count all the
‘Musa’ and displays the total count in the upper right
corner and place the cursor over the first occurrence from
top.

F ‘Musa’ FIRST/LAST Locates the First/Last ‘Musa’ in the dataset/member


opened.

F ‘Musa’ NEXT/PREV Locates the Next/Previous ‘Musa’ with respect to the


current cursor position in the dataset/member opened.

Note: ALL/FIRST/NEXT/PREV/LAST are mutually exclusive


keywords.
F ‘Musa’ CHARS This is same as F ‘Musa’. Look for ‘Musa’.

F ‘Musa’ WORD Look for ‘ Musa ‘. Word is a string followed and prefixed by
space.

F ‘Musa’ PREFIX/SUFFIX Look for ‘Musa’ as a prefix or suffix with some other
strings.
Note: PREFIX/SUFFIX/WORD/CHARS are mutually
exclusive.
F ‘Musa’ X Locates the string ‘Musa’ in excluded lines.
NX searches the string only in non-excluded lines.
Note: X/NX are mutually exclusive with each other.
Locates the next occurrence of the string that was
F * NEXT searched in the last find command.
C ALL ‘Musa’ ‘Muthu’ Changes all ‘Musa’ as ‘Muthu’.

Note: Change command is nothing but find and replace. So


from string can be qualified with other keywords available
in FIND command. Ex C ‘st1’ ‘str2’ 1 replaces only the str1
that are in first position to str2.
DEL ALL X/NX Delete all the excluded/Not excluded lines. DEL .A .B
deletes all the lines between .A and .B
; Represents Enter key. So multiple commands can be given
in one shot with ‘;’ separation.
SORT 5 15 A Sorts in 5-15 in ascending sequence. Maximum 5 fields
can be given. D for descending.

www.mvsquest.com ISPF Page:2


Mainframe Refresher Muthu

Special String Characters that can be used with FIND and CHANGE:

Char Meaning Char Meaning


P’=’ Displays any character P’.’ Displays any non-displayable
character
P’#’ Displays any numeric P’-‘ Displays any non-numeric
P’@’ Displays any alphabetic P’<’ Displays any lower-case
alphabetic
P’>’ Displays any upper-case P’$’ Displays any special character.
alphabetic
X’nn’ Finds the hex value of nn. P ‘¬’ Displays any non-blank
character

C P ‘¬’ ‘ ‘ 73 80 ALL changes all non-blank characters in 73-80 to spaces.

Primary commands prefixed with & (ampersand) is left in the command line after
execution. This way the same command can be entered multiple times without
retyping it in each time.

www.mvsquest.com ISPF Page:3


Mainframe Refresher Muthu

Primary Commands Mapping to PF Key

Any of the line commands can be mapped to a PF key and invoked by


pressing that key. Example if you map ‘X ALL’ command with PF4, then every time
PF4 is pressed, all the lines are excluded. Mapping can be done by the line command
KEYS. In this way, 24 keys PF1-PF24 can be mapped. PF13-PF24 is nothing but Shift
+ PF1- PF12.

Typical assignment of the keys is given below:

PF1 Help
PF2 SPLIT - Split the screen at the cursor’s location
PF3 Exit
PF4 Exit or RETURN
PF5 RFIND - Find next occurrence of the last F command
PF6 RCHANGE – Change next occurrence of the last C command
PF7 UP
PF8 DOWN
PF9 SWAP
PF10 LEFT
PF11 RIGHT
PF12 RETRIEVE - repeats the previous command line command

www.mvsquest.com ISPF Page:4


Mainframe Refresher Muthu

LINE Commands:

Com- Meaning Com- Meaning


mand Mand
C Copy this line. C 10 copies 10 CC Copy the block of lines
lines. This will be followed by
the line commands A or B.
M Move this line. M 10 copies MM Move the block of lines
move 10 lines. This will be
followed by the line commands
A or B.
A/B After(A)/Before(B) this line,
place the copied/moved line(s).
A10 repeats the copied/moved
lines 10 times.
Rn Repeats the current line n times. RR Repeats the block of lines. RR 10
Just R repeat 1 time. repeats the block 10 times.
UC Change this line content to UCC Changes the content of the
uppercase blocked lines to upper-case
LC Change this line content to LCC Changes the content of the
lower-case blocked lines to lower-case
D Deletes the line. ‘D n ‘ deletes n DD Deletes the block of lines.
lines from this line.
I Insert 1 line. After entering the I 10 Insert 10 lines. Once enter is
data in the first line, next line pressed, the remaining
will be inserted. untouched lines will be removed.
Useful for line by line data entry Useful for control-C, control-V
actions
X Exclude this line. X10 excludes XX Exclude a block of lines.
10 lines starting with this line.
S Show one line of the excluded F/L Shows the First/last line of
text. S 10 shows 10 lines. excluded text. L 10 shows the
last 10 lines.
)n Shift the line content by n ))n Shift the block of lines by n
columns to the right side. columns to the right side.
(outside). >n is same as )n but >>n is same as ))n but in case
in case of data truncation, of data truncation, operation will
operation will be error out. be error out.
(n Shift the line content by n ((n Shift the block of lines by n
columns to the left side.(inside) columns to the left side.
<n is same as (n but in case of <<n is same as ((n but in case
data truncation, operation will of data truncation, operation will
be error out. be error out.
TS n To split text in two at the point TF n To flow fragments of sentences
of cursor to allow a word, phrase into paragraph. N defines the
or sentence to be inserted. N width.
number of lines are inserted
between the two parts of text.
TE Text Entry mode is used for bulk BNDS To process only over a column of
entry of text and allows power data, define the range of
typing techniques to be used at columns using BNDS line
the terminal. (Type data without command.

www.mvsquest.com ISPF Page:5


Mainframe Refresher Muthu

bothering about end of line, line


numbers etc .The FINAL enter
will re flow the data.)
MASK It allows to put fixed data into O Overlay command indicates the
the new lines being entered. (over target line(s) when merging
Type MASK over a line number lay) lines. Overlay is used in
and press enter. Overtype the conjunction with M or C line
mask with whatever we want. commands.
Now every time we enter new C 0300 *
lines with I, TE, TS – mask lines O 0400 MVSQuest
will be displayed rather than Result:
empty lines. 0300 *
0400 * MVSQuest
O10 overlaid the first 10 lines.
OO-OO overlaid the block of
lines.

www.mvsquest.com ISPF Page:6

You might also like