Take Control of Your TSO/ISPF Profile(s)

 

It's time for you to take control of your TSO sessions.  Own your own TSO/ISPF Profile(s).   We start by just jumping in the deep end:  Take control of your saved ISPF Profile variables (the easy way) (even the ones you didn't think you could change).

You know how you logon in the morning, and ISPF seems to remember things like the name of the last dataset you edited yesterday, how your JOB statement(s) should look, and all sorts of other things that you've typed into the entry fields on different ISPF panels?  Most of that stuff is saved in your ISPF Profile dataset.  The ISPF Profile dataset usually has a name like 'YourID.ISPF.ISPPROF', and it has potentially hundreds of members.  Those members store most of the stuff that ISPF seems to remember.

To answer your unspoken question, Yes, actually, you can edit that dataset, BUT you have to be careful because it contains hex stuff that can get messed up, and you also don't want to mess up any alignment of the data.  And yes, in most cases you can just go back to wherever you typed a thing in the first place, and retype it; but that can be tedious, and it doesn't always work for everything.  Another idea you think of: What happens when you want to make the same simple change everyplace and there are a lot of places: Maybe you want to copy an existing profile dataset and then change all occurrences of one 7-letter userid to a new 7-letter userid.  You wonder if you can do that using a utility program.  Yes, you can use File-AID (Specifically, you use File-AID option 3.6); in fact that's something I do myself if I want to change the userid like that (as long as the two userids are the same length).  Still, there are times when none of those ideas is quite what you want.

An example: Let's say You use ISPF option 6 to enter and save TSO commands, especially long ones with awkward syntax that you don't want  to remember and you don't want to retype.

ISPF option 6 keeps a short list of your most recent commands, letting you retrieve and re-execute the command of your choice, with or without changing it a little.  You should cut-and-paste that list into a scratch pad file someplace, but back on the main track: You want to be able to change the commands right there in the list, without executing them; and the list is protected against you overtyping the saved commands.

Suppose you mistyped something.  Worse than that, imagine you typed a mistake that reveals a deep and profound misconception of your work environment, or contains an embarrassing Freudian slip, and you would rather avoid having any of your co-workers get a chance to notice it.  But ISPF pops it right in at the top of the list, to save until you've entered ten other commands.

Dang.  Looks like another case of a machine trying to get the better of you.  At least, it looks that way at first glance . . . but in a few minutes you'll be able to turn the tables (if you read on. . .)

Even without knowing about ISPF Profile variables, you think of a couple of other options immediately.  One, you can type in several other commands, causing the evidence of your mistake to roll off the bottom of the list; but then you'll lose all the other commands in your list too.  Two, you can either cancel your TSO session or you can just hit the attention (attn) key to get thrown out of ISPF into READY mode before ISPF saves the changed list into your profile.  That should work if you think of it right away, and you don't mind losing whatever you've got going on in your other split screens.

Putting aside those ideas, let's see how to do it without losing anything.

You exit ISPF option 6 and go to option 7.3, and voila, a screen full of apparent gibberish appears — Variables and their values.  Importantly, much of the gibberish can be overtyped.  A few lines down from the top you can see a line that says "Variable  P  A  Value"   (The column headings).   The data you want to overtype is going to be found under the "Value" column.  The first column is just the name of the variable, which you don't really need to know.  There are hundreds of variables, and a name can't be longer than 8 characters, so that means a lot of them will look like, well, gibberish.  The second column, titled "P", tells what kind of variable it is (what "pool" it swims in).  You're looking for Profile variables, which are identified by having a "P" (for Profile) in the "P" (for Pool) column.  That other column, titled "A" (for attributes), will usually be blank for the Profile variables.  If it says "N" it means No, you can't overtype the value, but that applies to things like the time and date, not to the profile variables.  Just use F8 to page down through the list until you get to the ones with "P" in the "P" column.  Keep paging through the "P" variables, looking at the data under the "Value" column until you see the data that you want to change.  For the case in our example, the Variable name (column 1) will say PTCRET01, so it isn't too terribly far down.

Having found it, you overtype the string that you don't want with something else that you do want.  (If you don't actually know of any text you want to put there, try just putting TIME or PROFILE or some other innocuous short command padded out with blanks.)  After overtyping the value, you stare at it carefully for a minute to make sure you didn't make some other mistake while fixing the first one.  When you're satisfied that it looks good, you press F3  (or whatever key you have set to mean END).  Now you're laughing (metaphorically, probably not literally).  Go back to option 6 just to check.  There you are: the list now looks the way YOU wanted it to look.  Mission accomplished.

But wait a minute.  Didn't you notice other stuff while you were paging through that list?  Go back to 7.3 and have a look around.  You recognize your job card(s), some dataset names you've used on edit or utility screens, lots of stuff.  Most of it can be overtyped right there, without cruising around to all the individual screens where the text was originally set.  Hey, you realize, you can do this.  You own this.  You've got the power.

Remind me sometime to tell you about inserting a variable named ZSTART into the list as a new profile variable, to specify stuff you want to have happen automatically when you start ISPF.  Yes, you can do that [provided your z/OS system is at least at level 2.1].  There are two (2) line commands available: i (for insert) and d (for delete).  Type the letter i on the far left of any line, to the left of one of the Variable names, and press enter.  A blank line appears.  Put the word ZSTART for the Variable name, put P in the P column (I know, your dog would love this), leave the A column blank, and under Value you get to type in a string representing what you want to have happen automatically at ISPF startup.   The string you put in should follow this pattern:

ISPF;2;Start S.h;Start 3.4;Swap 1

The interpretation of the above string is as follows.  It always starts with ISPF.  After that you indicate a virtual new line by putting in a semi-colon (;)(Semicolon is the default value for the line separation character.  If you've changed yours to something else, use your own line separation character instead of semi-colon when doing this.  The line separator functions like an imaginary press of the Enter key, allowing you to string multiple commands together on the same line.)  In this example, you want to get three split screens started automatically whenever you start ISPF.  The first one will be Edit (option 2), the second one will be the SDSF hold queue (S.h), and the third one will be DSLIST (option 3.4).  You say Swap 1 at the end to tell ISPF to put you back onto the first of your split screens, the Edit screen.

If you're wondering why you can't just say ISPF 2, instead of having to say ISPF first and then say 2 on a separate logical line, well, I don't know why IBM requires that.  I just go along, because that's what you do to get it to work.  The first thing seemingly has to be just ISPF by itself.

When you're actually on the READY mode screen, you can type ISPF 2 if you like, and it will take you directly to ISPF edit.  It won't execute your multiple ZSTART commands then, though.  You can also say ISPF BASIC from READY mode if you want to skip your ZSTART.   What if you're already in your extravagant multi-session environment you've brought on yourself, and you want to get out of it all at once?  You use =XALL as the command.   (It can sometimes abend, by the way, but it does get you out, back to READY mode).  But we digress from our original digression.

When you go into ISPF after setting up your ZSTART, you'll automatically be on the Edit screen (if you used the example commands), and you'll have two other sessions started on alternate screens.  Before that, though, while you're still back in ISPF 7.3, having just put in your ZSTART profile variable, your option 7.3 screen (well, part of it) now looks something like this:

Variable        P  A    Value
.                                 —-+—-1—-+—-2—-+—-3—-+—-4—-+—-5—-+–
ZSSSMODE P   B
ZSTART       P         ISPF;2;Start S.h;Start 3.4;Swap 1
ZSUPSPA    P
ZSUPSPB    P

To save what you've done, you press the END key (generally F3); and that also takes you back out of the 7.3 area, to the more ordinary part of ISPF.  There'll be an extra screen, more of a popup really, but just F3 past that.

Anyway, so much for  ISPF Profile Variables, and dealing with most of the character strings that ISPF saves for you.

What about flags and switches, though?  Obviously a lot of things are controlled by on/off or Y/N  or multiple choice settings, and if you don't know the names of the variables then you can't very well use option 7.3 to change the values in them.   Doesn't matter.  A lot of them can be changed on the ISPF Settings screen (option 0), and that's probably the easiest way to set them anyway.  If you do happen to know and remember the name of a variable and you want to go straight to it in option 7.3 next time, the command for that is not FIND, it's LOCATE (or LOC).

On our next outing, let's visit ISPF option zero (Settings) and see what can be done there to improve your virtual environment.

What can you change in option zero, ISPF Settings, you ask?

A lot.  Here are some highlights:

Command Line position – Most people prefer Top but the default is Bottom
Changing what Function keys do (F12=CANCEL?  Whose idea was that?)
Changing Function keys (12 or 24), KEYLISTS (yes or no)
Get rid of that annoying underlining of all the fields where you type things
Log/List – Suppress that useless extra screen displayed when you exit ISPF
Long message in a box (or not)
Message ID numbers on messages (makes them easier to Google search)
Terminal type 3278T and format Max
Putting the calendar on your primary options menu
Seeing the screen name in the upper lefthand corner of screens

We'll talk about the first few of those in the next article.

So, the title of this piece you're reading — didn't it mention "Profile(s)", with an S?  So far we've only talked about your ISPF Profile.

Maybe you're wondering: How many profiles do you have in TSO, anyway?

Listing just the main ones, You have one each for native TSO, RACF, SDSF, FileAID or any other similar tool, ISPF general Settings, and ISPF dataset edit (one edit profile for each dataset type, up to your site-specific limit).  "Dataset type" means the last part of the name after the last dot, what would be called a file extension on the PC.  The EDIT profiles, like most of your Profiles, live in your ISPF Profile dataset.  Some other profiles, like your native mode TSO and your RACF profiles, are saved elsewhere.

Next time we'll talk about some of the ISPF option zero settings, because resetting those can save you a lot of annoyance.  Meanwhile, if you don't want to wait for me, you can always go to ISPF option zero and type "HELP", which will allow you to read through the "ISPF Settings" tutorial.  If you want to read the tutorials, though, you probably should start in Edit, because the Edit tutorial will probably be what you'll find the most useful (in my opinion).

So, yeah, we're just getting started.  Good start, though, yes?

2 comments on “Take Control of Your TSO/ISPF Profile(s)

  1. The "Zstart" variable only works on shops with z/OS V2R1 (2.1). I have 1.6, so saaad… Thanks for the info as always!

Comments are closed.