z/OS Kung-fu Moves

#1 ISPF Combo moves 

By far the easiest way to master z/OS is to learn how to navigate and edit with ISPF really quickly, and the best way to bring swiftness to ISPF is through some choice combo moves.
Screenshot here of the ISPF Primary Option Menu.
I’m going to open up a dataset and play around to show some simple yet effective combo moves to get things done faster in ISPF.
To open a dataset for editing, enter one the following on the Option ===> prompt
           
            =3.4 or =3;4
These are shortcuts that concatenate the commands for going to the “3” Utilities and then the “4  Dslist panel.  This allows you to quickly navigate to DSList, which is one of the most powerful utilities in ISPF.

Once the “Data Set List Utility” is displayed, I can enter a Data Set name.  In this case, I’ve forgotten the exact Low-level Qualifier (LLQ) of my Data Set that I’d like to select. However, since I remember part of the dataset qualifiers, I can use wildcards “*” to help me out.  By entering BS9U.DEVT3.CLIB*, I can see all matching datasets.

Note: An LLQ is the last qualifier in a data set.  It’s the segment after the last “.”

This brings up a list of all the datasets that matched my dataset name parameters.  In this case, I see CLIBANDER, CLIBJAS, CLIBJAS3, CLIBPAU, CLIBRIC, CLIBSUT, and CLIBTOM

Hmm, it seems that I still can’t remember which of these data sets might contain the data I’m interested in, let alone the name of the particular member! 
Rather than thumbing through each data set, I decide to use a little-known command:
SRCHFOR [string]
This command invokes SuperC  [=3.12] to search for that string.  In this case I’m looking for the member that has the word “Coffee” in it.

The string is found in one of the data sets, in this case BS9U.DEVT3.CLIBPAU

Once I know the data set, there are two ways to find which member I want. 

Firstly, I can look in the output data set from SuperC, which is stored my default at userid.SRCHDSL.LIST


Secondly, I can simply  an “E” (for edit) next to the dataset, in this case BS9U.DEVT3.CLIBPAU, and issue SRCHFOR COFFEE again.  This time the search will be executed within the context of the data set, identifying the particular member I’m interested in.

It turns out that the member “TIMMIES” is the one I want.  (Here in Canada we drink a lot of Tim Horton’s coffee).

Now it’s time to edit this member, I place an “E” (edit) next to TIMMIES to edit this lovely member…a simple REXX program I wrote a few years ago available @ http://paulywill.com/mainframes/first_rexx_program

Since it’s been a few years since I’ve written this REXX EXEC, perhaps I’ve since given up coffee and switched to tea.  So naturally I’ll have to change every instance of “Coffee” to “Tea”.
First I want to see how many instances of the string “Coffee” are in this program using the find command:
F all coffee

Notice that the results are not case sensitive.
From the “ISPF Edit and Edit Macros ISPF Edit and Edit Macros” manual:

Once I’ve selected all of the strings I’d like to replace using using the FIND (or F) command, I can then change all the instances of “Coffee” to “Tea with the CHANGE (or C) command as follows:
C all Coffee Tea


Mmm… refreshing Canadian Tea.

Now that Tea Time is over, let’s add some more Kung-Fu

First, go ahead and change the strings back from tea to coffee using the following commands:

F all Tea
C all Tea Coffee

Now that we’re back to coffee, let’s assume I just want to display the lines with instances of  “coffee” and exclude all other lines of text in this member.

I could first use the EXCLUDE ALL (or X ALL) command to hide all of the lines of text:
xall

Then I could follow that with a find command for all lines with the String Coffee (here we specify ‘all’ to find all result):
fcoffee all

Then we can hide all of the ugly “Line(s) not Displayed” overlays by specifying:
            x hide

Let’s speed things up…

Let’s setup some of our keys so we’ll never have to enter those commands again.
Enter “Keys” at the command line to open up the “Keylist”.

If you scroll down (F8) you’ll notice it goes up to F24.  By pressing shift you can access this extra set of F keys for your own use.
For example you see that I have designated:
           
  • F21 (Shift + F9) has the SWAP command to switch between split screens (we can cover setting up split screens like a super star on another Kung-Fu Move) 
  • F22 (Shift + F10) has a reset command (RES) 
  • F23 (Shift + F11) has the commands we just entered EXCLUDE ALL; HIDE X; 
  • F24 (Shift + F12) has the CRETRIEV command which I use ALL THE TIME!!!  If the cursor is not on the command line it will place the cursor there; if I keeping hitting the key it will cycle through the last commands I entered,
Back to our example I could have:

  1. Opened the member with EDIT
  2. Excluded all the lines and hide exclude information with my F23 key (x all;hidex)
  3. Used the FIND command to find all the instances (f all coffee) 
  4. Made all the changes (C all Coffee Tea)
  5. Pressed F22 to reset the screen and see our changes 
  6. Saved changes with the SAVE command (my F4 key)
Boom!  All done.
Knowing some basic ISPF navigation, little known commands, and doing some basic KEY setup can speed things up.
For more Kung-Fu moves from others:
Google  “100 COOL MAINFRAME TIPS by Johnathan Jeban Martin”
Google “ISPF Hidden Treasures by Peter Van Dyke”

Flawless Victory!

Paul Gamble
Graduate of Georgian College, Computer Programmer Analyst program

After doing a four month internship with the Canadian Government, Paul was offered the rare opportunity to work in their on-site Data Centre. Starting out as an Operator for four years before becoming a Systems Programmer rolling out different independent software vendors (ISVs) and different IBM Tivoli products for monitoring and automation to the z/OS platform. Paul enjoys the constant learning the z/OS operating system offers in comparison to other platforms. On weekends you’ll find Paul getting his adrenalin fix by instructing and coaching at the local skydiving drop-zone.
Connect with Paul on LinkedIn
 

IDENTIFICATION DIVISION.
  PROGRAM-ID. MAINFRAME RAP .
PROCEDURE DIVISION.
My name’s Gene Amdahl reincarnate
and I’m the builder of the plan upon z is based
I understand you’re IT on a mission
but if you could just stay a min
stay a while and listen
Once again the force of mainframe must erupt
and melt Cisco UCS.
Thank you very much!
And I suppose I’m responsible
for dealing with this Windows epidemiological
Chronicle of a diabolical Oracle
It’s Horrible when your chance of uptime
is thinner than a hair follicle
Smaller than a molecule
HP’s more than metaphorical
It’s down and beat down
Into the Cracks
Underground like my Raps
Now let me tell you the facts
You need these to run your apps to the max
So ensure your CIO’s ears are clear and sound gets through the wax
System z comes in five flavors at once
If you need speed, then TPF’s a slam-dunk
Linux is all the rage
When on VM it is staged
And VSE won’t take your whole wage or affront
z/OS is the flagship of centralism
Today’s the day you make the fate-changing decision
Make Haste before you find your job off-shored
Run to Office Depot
Grab a marker and a white-board.
If you’re struggling with Amazon, just
Tap my number in, and ask for Sean, ‘cause
In that conundrum I am the man
To leave Jeff Bezos heaving, gasping
Like it’s asthma, damn,  ‘cuz
I got the Masterplan
I GOT THE MASTERPLAN
I take Big Iron and I craft it like an Artisan
The improvement of z is essential
Through the use of my weapon, the pencil.
Tearing apart Exa hardware like parchment
Giving Larry’s heart a myocardial Infarction
You’ll beg my pardon when I call z the mainframe
But I blog to fight against the brain drain.
So lyrically I’m lethal
All I need is beats and to THINK
And you’ll rise like an Eagle
Double down on the mainframe option
And you’ll run this IT game like a Watson.
STOP RUN.
For more mainframe rap, check out Forgot about z