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:
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).
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:
Then I could follow that with a find command for all lines with the String Coffee (here we specify ‘all’ to find all result):
Then we can hide all of the ugly “Line(s) not Displayed” overlays by specifying:
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:
Opened the member with EDIT
Excluded all the lines and hide exclude information with my F23 key (x all;hidex)
Used the FIND command to find all the instances (f all coffee)
Made all the changes (C all Coffee Tea)
Pressed F22 to reset the screen and see our changes
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”
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