We have
run across quite a few interesting functions with
the TSO editor
over the years. As time goes by, they
usually get around to everybody. So, we
are going to start documenting some of the TSO
features we have run across
that others may benefit from too. If you
know of a TSO command or function that
you think others may benefit from, just email us
about it and maybe we'll add it to
this section.
START Command
Module Masking
Exclude and Flip Commands
Creating A Dataset of Dataset
Names
START Command
From the TSO command line, you can enter the START
command and get a completely new TSO window
similar to using the SPLIT command. One big
difference is that you can keep getting new TSO
windows up to the limit specified by your System's
Group. If you open too many, it can be difficult
keeping track of what window is what.
However, it can be very convenient to be able to
get a new window whenever you want to; you can
always exit out (=X) whenever you want.
Module Masking
Did you know that you can bring up only the
modules you want in Browse or Edit simply by
putting in a mask by the TSO dataset from the
Utility DsList screen (=3.4)? Here is a
sample:
-----------------------------------------------------------------------------
. SSI.PROD.COBOL
. SSI.PROD.COPYLIB
E SSI.TEST.COBOL(*001)
-----------------------------------------------------------------------------
Note that the last dataset has a mask of
'(*001)'. You can actually move your cursor
out to the end of the dataset name and type in
such a mask. The sample above would bring up
all the modules that end with '001' in "edit
mode".
* Thanks to Joe Detrio
Excluding and
Flipping
If you haven't learned about the Exclude command
(X) and the Flip command (FLIP), you really should
take a few minutes to try the following example:
Suppose you would like to edit a Cobol module and
find all the lines of code that have modification
identifiers in them. And suppose that any
line that has had modification or additions also
has some form of date and/or initials in columns
73 thru 80. Since there can be more than one
date and set of initials, you cannot look for a
single constant in columns 73 thru 80. Now,
there are often many ways to solve the same
problem in TSO, but we are going to solve this
problem using the Exclude and Flip commands.
Suppose you are in "Edit Mode" for a
Cobol module and you perform the following
TSO commands:
1. X ALL (this excludes all source lines from
view)
2. F ALL ' ' 73 73 (this finds and brings into
view all lines that have a space in column 73)
3. FLIP (this reverses your screen view by
excluding all the lines that you currently see,
and brings all the lines that were excluded into
view).
Effectively,
all lines that have something other than a space
in column 73, and only those lines, are now
viewable. Don't be afraid of those lines
that are excluded. They are still
there. If you want to bring up all lines
again, just type RES (reset) in the command
line. You can also delete either all the
lines that are excluded, or all the lines that are
not excluded.
DEL ALL X (deletes all excluded lines)
DEL ALL NX (deletes all non-excluded lines)
The last one is a little scary, since it appears
every line is gone until you type Reset.
There are obviously many variations using these
commands. Once you start using them, you will
wonder what you ever did without them.
Creating A
Dataset of Dataset Names
If you would like to create a dataset containing
the names of all the datasets listed when using
option 3.4, simply type "SAVE XXXXXX" in
the command line, where XXXXXX will be the second
node of the dataset created. Your UserId
will be the first node and "DATASETS"
will be appended as the third node. Example: If
your UserId was USERXX and you typed "SAVE
PDSLIST" from the command line while in =3.4,
all datasets that qualified for selections would
be contained in a file named "USERXX.PDSLIST.DATASETS".
* Thanks to Will Lamers & Doug Beck
Copyright © 2000
[Softech Solutions, Inc]. All rights reserved.