Some Commands and Shortcuts for the MVS ISPF Editor
This document lists some of the more common ISPF editting commands and
the PF key shortcuts. There is also a brief overview of the editor and
its "philosophy"
ISPF Overview
ISPF editor is a strange mix of in-place editting like emacs in overwrite
mode and line oriented editors like vi. Strictly it is page oriented
and within a page you can move the cursor, overtype existing text or type
new text.
There is a command field opposite each line into which you can type
line commands to copy, delete or move lines. These take effect the
next time you hit enter.
There is also a command-line at the top of the screen similar
to the ':' prompt in vi or the M-x prompt in emacs (or the DO key
for all you VMS/TPU users...). Here you type commands like 'DOWN 200' to
move 200 lines down the file.
Finally there are the Function (PF) keys which can be tailored somewhat
to your own requirements and allow you to split screen (actually giving
a new TSO session!), page up/down etc.
Note that the editor in Infoman is a subset of ISPF - only the most
basic commands work in either the command line area or the command field.
ISPF PF Keys
-
PF1 Help screen
-
PF2 Split screen at current cursor position - starts a new TSO/ISPF
session.
-
PF3 End - return to previous task saving edits
-
PF4 Return - Don't know what this actually does!
-
PF5 RFIND - Repeat last find command
-
PF6 RChange - Repeat last change(replace) command
-
PF7 Page up - behaviour depends on scroll settings
-
PF8 Page Down - behaviour depends on scroll settings
-
PF9 Swap - swap screens if split
-
PF10 Left - Move screen window left
-
PF11 Right - Move screen window right
-
PF12 Retrieve - Command history
ISPF Command line commands
The most useful are:
-
UP [n] - where n is the number of lines to move up.
-
DOWN [n] - where n is the number of lines to move down.
-
F[ind] :string: - Finds the string
-
prepending the string with 'C' makes it case sensitive
-
prepending the string with 'P' treats as a PICTURE string - like a
"regular expression"
-
# = number
-
@ = alpha
-
$ = non alpha
-
> = uppercase
-
< = lowercase
-
R[eplace] :string: - Replace the string.
Other useful commands include:
-
TE [n] - Text Entry - Gets rid of the left hand ' ' ' ' ' and line number columns
giving a straight text entry screen. The argument limits the range to the
next N lines.
-
TF [n] - Text Flow - ie reformat the text to fill lines etc. The argument
limits the range to the next N lines.
-
X [n] - EXCLUDE - Hides next N lines (or using XX hides the defined block.)
-
RESET - Restores hidden lines
-
SORT <n> <m> - Sort based on columns N to M
-
SORT <.L1> <.L2> - Sort between 2 labels - labels are values in the
..... region beginning with a '.'
-
SEARCH - like find but the following have special meaning:
-
SEARCH <string> PRE - find where word begins with <string>
-
SEARCH <string> SUF - find where word ends with <string>
-
SEARCH <string> WORD - find where <string> is a word
-
COLS - display a ruler like display - useful when using SORT.
ISPF In-Line Commands
The In-Line commands come in 2 varieties. Single letter commands
act on a single line. These include A, B, I etc. Range
Commands consist of double letters marking the start and finish of
a range. Thus CC will be entered at the start line and finish line
of a region to be copied. An A will insert the copied block into
the file starting on the line after the one with the 'A'.
The most common Line Commands are listed below(* means a range can
be specified):
-
A - After - Pastes buffer text after marked line
-
B - Before - Pastes buffer text Before marked line
-
C* - Copy marked line/range
-
D* - Delete marked line/range
-
I - Insert - Open a new line for inserting text(no paste)
-
M - Move - Moves marked line/range to an A or B position (There
must be an A or B defined)
-
R - Repeat - Copies the current line/range to immediately after
itself (needed since you can't put a C and an A on the same line...)
Note: You have to be careful when specifying multiple commands in the same
screen that you don't try to copy a deleted line etc. The commands are
performed in sequential order. You will get a reasonably helpful
error message if you do get too clever for your own good!
That should be enough to be going on with. There are lots more things
you can do but you'll need to find and ask an ISPF expert for that
- try somebody in ASG!...