0% found this document useful (0 votes)
100 views7 pages

Ispf & Tso: Mainframe Refresher Part-1 Page

The document provides information on ISPF (Interactive Spool Productivity Facility) and TSO commands in 3 pages. It describes primary commands in ISPF editor/view panel like KEYS, RESET, TOP, and line commands like C, M, A, B, D, I, X for copying, moving, inserting, deleting lines. It also covers find and change commands with examples and mapping commands to function keys.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
100 views7 pages

Ispf & Tso: Mainframe Refresher Part-1 Page

The document provides information on ISPF (Interactive Spool Productivity Facility) and TSO commands in 3 pages. It describes primary commands in ISPF editor/view panel like KEYS, RESET, TOP, and line commands like C, M, A, B, D, I, X for copying, moving, inserting, deleting lines. It also covers find and change commands with examples and mapping commands to function keys.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Mainframe Refresher Part-1 Page:1

ISPF & TSO


Mainframe Refresher Part-1 Page:2

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 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’.
Mainframe Refresher Part-1 Page:3

F ‘Musa’ 1 Locates the next ‘Musa’ in the first column


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.
Mainframe Refresher Part-1 Page:4

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.

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
Mainframe Refresher Part-1 Page:5

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 columns to the right side.
side.(outside). >n is same as )n >>n is same as ))n but in case
but 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.
Mainframe Refresher Part-1 Page:6

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.

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.
Mainframe Refresher Part-1 Page:7

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 ALLOCATE DA(‘SMSXL86.TEST.SOURCE’) FILE(INP) SHR


(Existing dataset) It allocates the dataset ‘SMSXL86.TEST.SOURCE’ with logical
name INP. INP can be used in REXX for READ/WRITE.
ALLOCATE Allocation can be done using model-dataset attributes or with
(New dataset) 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.

You might also like