ISPF
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 definition at the
bottom of panel. To OFF this option enter PHSHOW OFF.
|
RESET
|
Clears all message lines and reset
the display of the dataset. RESET LABEL is required to clear labels.
|
X ALL
|
Exclude all the lines
|
COLUMNS/COLS / COLS ON/COL
|
Display a ruler at the top of the
screen. This can be 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-number/Label
|
Locates the line-number or the
label. Labels can be established in any line by the line command
.labelname.
|
RECOVERY ON
RECOVERY OFF
RECOVERY OFF UNWARN
UNDO
|
With RECOVERY on, UNDO line command
will revert the last recent change made in the edit/view session. REC OFF will off the recovery option and
UNDO Unavailable message will appear in the first line. REC OFF UNWARN is
same as REC OFF but there won’t be any UNDO unavailable warning message.
|
F ‘Musa’
F ‘Musa’ 1
F ‘Musa’ 1 30
|
Locates the next ‘Musa’.
Locates the next ‘Musa’ in the
first column
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
F ‘Musa’ FIRST/LAST
F ‘Musa’ NEXT/PREV
|
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.
Locates the First/Last ‘Musa’ in
the dataset/member opened.
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
F ‘Musa’ WORD
F ‘Musa’ PREFIX/SUFFIX
|
This is same as F ‘Musa’. Look for
‘Musa’.
Look for ‘ Musa ‘. Word is a
string followed and prefixed by space.
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.
|
F * NEXT
|
Locates the next occurrence of the
string that was 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.
|
|
Delete all the excluded/Not
excluded lines.
|
;
|
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.
|
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 alphabetic
|
P’$’
|
Displays any special character.
|
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.
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
|
|
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
|
LINE Commands:
Com-
mand
|
Meaning
|
Com-
Mand
|
Meaning
|
C
|
Copy this line. C 10 copies
10 lines. This will be followed by the line commands A or B.
|
CC
|
Copy the block of lines
|
M
|
Move this line. M 10 copies
move 10 lines. This will be followed by the line commands A or B.
|
MM
|
Move the block of lines
|
A/B
|
After(A)/Before(B) this line,
place the copied/moved line(s). A10 repeats the copied/moved lines 10 times.
|
|
|
R n
|
Repeats the current line n times.
Just R repeat 1 time.
|
RR
|
Repeats the block of lines. RR
10 repeats the block 10 times.
|
UC
|
Change this line content to
uppercase
|
UCC
|
Changes the content of the blocked
lines to upper-case
|
LC
|
Change this line content to
lower-case
|
LCC
|
Changes the content of the blocked
lines to lower-case
|
D
|
Deletes the line. ‘D n ‘ deletes n
lines from this line.
|
DD
|
Deletes the block of lines.
|
I
|
Insert 1 line. After entering the
data in the first line, next line will be inserted.
Useful for line by line data entry
|
I 10
|
Insert 10 lines. Once enter is
pressed, the remaining untouched lines will be removed.
Useful for control-C, control-V
actions
|
X
|
Exclude this line. X10 excludes 10
lines starting with this line.
|
XX
|
Exclude a block of lines.
|
S
|
Show one line of the excluded
text. S 10 shows 10 lines.
|
F/L
|
Shows the First/last line of
excluded text. L 10 shows the last 10 lines.
|
)n
|
Shift the line content by n
columns to the right side.(outside). >n is same as )n but in case of data
truncation, operation will be error out.
|
))n
|
Shift the block of lines by n
columns to the right side.
>>n is same as ))n but in
case of data truncation, operation will be error out.
|
(n
|
Shift the line content by n
columns to the left side.(inside)
|
((n
Shift the block of lines by n
columns to the left side.
<
TS n
To split text in two at the point
of cursor to allow a word, phrase or sentence to be inserted. N number of
lines are inserted between the two parts of text.
TF n
To flow fragments of sentences
into paragraph. N defines the width.
TE
Text Entry mode is used for bulk
entry of text and allows power typing techniques to be used at the terminal.
(Type data without bothering about end of line, line numbers etc .The FINAL
enter will re flow the data.)
BNDS
To process only over a column of
data, define the range of columns using BNDS line command.
MASK
It allows to put fixed data into
the new lines being entered.
Type MASK over a line number and
press enter. Overtype the mask with whatever we want. Now every time we enter
new lines with I, TE, TS – mask lines will be displayed rather than empty
lines.
O
(over
lay)
Overlay command indicates the
target line(s) when merging lines. Overlay is used in conjunction with M or C
line commands.
C
0300 *
O
0400 MVSQuest
Result:
0300 *
0400 *
MVSQuest
O10 overlaid the first 10 lines.
OO-OO overlaid the block of lines.
TSO
Frequently
used TSO commands are listed in the table. They can be issued from any ISPF
panel with TSO prefix. TSO prefix is not required if you execute them in TSO
panel. (Option 6 of ISPF)
If
the command is incomplete, TSO prompts for the missed parameters.
The output of the processed command
is displayed in ISPF, in line mode.
SYS1.HELP
dataset contains all the TSO commands, syntax and their usage.
Command Syntax
|
Purpose
|
HELP [COMMAND]
|
Displays the purpose and syntax of
the command.
The source for this information is
retrieved from ‘SYS1.HELP’.
Ex: HELP ALLOCATE
|
SEND
|
It is used to communicate with
other users.
SEND ‘REFRESHER COMPLETED’
USER(SMSXL86) LOGON
Message ‘hi’ is sent to user
SMSXL86. If the user is not logged on, the message should be displayed the
next time user logs on. LOGON is an optional parameter.
Message: 115 chars maximum
|
LISTCAT
|
It is used to list entries in MVS
catalog. The syntax and the available options are explained in VSAM - IDCAMS
section.
LISTCAT
ENTRIES’SMSXL86.TEST.SOURCE’ ALL
|
LISTDS
|
It is used get the information
about one or more datasets.
LISTDS ‘dataset-name’
MEMBERS|HISTORY|STATUS|LEVEL
MEMBERS list all the members of a
PDS. This command is useful in REXX to process all the members of a PDS.
|
RENAME
|
It is used to rename a dataset.
Generic datasets are allowed.
RENAME ‘BPAMAIN.TEST.*’ ‘BPMAIN.UNIT.*’ renames all the datasets
start with BPMAIN.TEST to BPMAIN.UNIT.
RENAME ‘SMSXL86.TEST(MEM1)’ ‘MEM2’ renames mem1 as mem2 in the PDS
‘SMSXL86.TEST’.
|
DELETE
|
It is used to delete dataset(s).
PURGE qualifier is needed to bypass expiration date checking.
DELETE ‘BPMAIN.TEST.*’ PURGE
|
ALLOCATE
(Existing dataset)
|
ALLOCATE DA(‘SMSXL86.TEST.SOURCE’)
FILE(INP) SHR
It allocates the dataset
‘SMSXL86.TEST.SOURCE’ with logical name INP. INP can be used in REXX for
READ/WRITE.
|
ALLOCATE
(New dataset)
|
Allocation can be done using
model-dataset attributes or with new attributes or combination of both.
Attributes that can be specified
are:
UNIT, VOLUME, SPACE,
TRACKS|CYLINDERS|BLOCK(blk-length), DIR, RECFM, LRECL, BLKSIZE, DATACLASS,
STORCLAS, MGMTCLAS, EXPDT/RETPD.
Model parameter:
LIKE(‘model-dataset’)
|
FREE
|
De-allocate the
allocated-datasets.
FREE FI(logical-name)
FREE DSNAME(‘dataset-name’)
FREE ALL
|
ISRDDN
|
It displays the files/datasets
allocated to your session.
‘M member’ command searches the
member in all the datasets allocated to you. If you want to see the source of
a utility, give a search using the command ‘ M utility-name’ in the ISRDDN
panel.
|
CALL
|
It is used to execute a load
module.
CALL ‘BPMAIN.TEST.LOADLIB(TEST1)’
– Executes the load TEST1. If the program needs any datasets, then they
should be allocated before issuing this command.
|
SUBMIT
|
It is used to submit a job to
JES.
SUBMIT ‘PDS(MEMBER)’[
JOBCHAR(‘A’)]
|
CANCEL
|
It is used to CANCEL /PURGE the
job from JES.
CANCEL JOB-NAME| JOB-NAME(JOB-ID)
[PURGE]
|
STATUS
|
It is used to get the status of the
submitted-job in JES.
STATUS JOB-NAME | JOB-NAME(JOB-ID)
|
ALTER
|
It is used to alter the attributes of
a dataset. Ex: Management class.
|
TSO Commands can be executed in batch
(JCL) using terminal monitor program IKJEFT01.
//RUNBATCH EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
RENAME ‘MVSQUEST.EMP.DATA’ ‘LEADSOFT.EMP.DATA’
RENAME ‘ MVSQUEST.SALES.DATA’ ‘LEADSOFT.EMP.DATA’
/*
The above step renames two datasets
from MVSQUEST qualifier to LEADSOFT qualifier. Any high volume manual job can
be completed in matter of minutes if you have good knowledge in ISPF and TSO
commands with little exposure to REXX.
No comments:
Post a Comment