MVS TOOLS AND TRICKS OF THE TRADE December 1992 Sam Golob MVS Systems Programmer sbgolob@cbttape.org Sam Golob is a Senior Systems Programmer PUTTING YOUR TOOLS TOGETHER - PART I. In practical work, we have problems to solve and tasks to do. Each one of us must marshal the tools we have available to attack the task at hand. For the past four years, much of this column was devoted to adding "another tool" to your collection of "weapons". Now, I'd like to change focus a bit. Consideraions that affect the speed of our work are the main topic we shall deal with in these next few issues. How can you arrange your tools so they are all at hand and ready quickly? How can you bring all your firepower to bear on your current problem, now! Just as important as having a tool installed, is being able to deploy it quickly when it is needed. We want to find ways of getting the immediate use of a tool right now, to be able to throw the tool at the problem right in front of us. For example, if you have to look at some output, you wouldn't want to interrupt your current work. If you need to allocate a new dataset, you'd like to do it without interrupting what you're currently in the middle of. In this month's article, I'll show you how to get this accomplished, and do much more. Learning how to quickly use your tools is as much a part or our trade as owning the tools. We continually work to refine "technique" skills as we progress in our careers. Every software product we use contains special command sequences or fine points, to help us do our jobs better. Knowledge of these commands is sometimes crucial to performing quick and accurate work. When it is relevant, I'll bring such commands into our discussion. What shall we talk about? We will have to split this subject into several installments because there are different topics that must be mentioned. Probably the most important one is ISPF command table entry customization. Using ISPF command tables cleverly is probably the easiest way to obtain speed at your work. We'll discuss ISPF command tables today. Next time, I'd like to mention the big software toolsets which integrate multiple function. The one I am most familiar with is the vendor product PDSTOOLS and its far more primitive predecessor the PDS TSO command. This tool alone allows you to throw hundreds of utility operations at one problem in a minimum amount of time. Then I'd like to discuss native TSO, both with and without ISPF. TSO itself was invented to quickly accomplish work on the system. I want to talk about TSO Command tools in general, both IBM-supplied, and tools written by users outside of IBM. We shall also talk about ISPF edit macro power, and we'll bring in other integration hints. The emphasis in this series will be on integrating multiple function. We want to make different software operations available "close together" to quickly deploy the maximum firepower we need to get a job done. It all means increased productivity, and saved hours. WHY ISPF COMMAND TABLE ENTRIES ARE THE BEST WAY TO START. Wouldn't it be nice, when you need something on the computer, to say to the computer (StarTrek style): "Computer. Get this for me." And the computer will go ahead and get it. In my opinion, the most important step you can take to integrate your tools, is learning how to customize ISPF command tables. When you enter a command on the command line in an ISPF screen, the command table entries are scanned first. The computer "goes ahead and gets it" without further ado. It's quick and direct. These command table entries have a lot of power. They have full access to the ISPF "SELECT" service. This means that any ISPF action which is accessible by a panel, is also just as accessible through a direct command. You tell the computer: "Computer, get me this!" And the computer does it, as long as you're under ISPF, and the command is entered in the command table. Frequently accessed ISPF functions should be put in the command tables. This will be to your tremendous advantage for the following reason: In ISPF Versions 2 and 3, there is capability to perform functions recursively, one function on top of another. The first function that you started with, isn't disturbed while a second function is invoked that overlays the screen temporarily. When you exit from the second function, you're back in the first function exactly where you left off. This can all be done on one "split" of the screen. It doesn't affect the second split, which is available at the same time for other maneuvers. This means that if you are in the middle of editing a member of some dataset, you can invoke ISPF 3.2 (or any other function) "on top" of the edit, without disturbing the edit. Then you can allocate, delete or inquire about the other dataset you need, press the END key (PF3), and you're still in the edit where you were before. You don't have to be in the EDIT function to use command table entries. You can be in any ISPF function. That's why good command table entries can be more basic to your productivity than a collection of edit macros. I'm not telling you not to use edit macros. In fact, we'll discuss the great power of edit macros in a later issue. I am asking you to marshal your forces and use EVERYTHING you have. Our emphasis is to INTEGRATE YOUR POWER and have all functions available at your fingertips. ISPF commands are the quickest start to achieve this. That's why command table entries are the best things to begin with. They're instant, they are always available, and they don't disturb your current work. ADDING AND CHANGING ISPF COMMAND TABLE ENTRIES. ISPF tables, of which command tables are a subset, belong to partitioned datasets that are accessed by two ddnames. The input ddname for tables is called ISPTLIB. ISPTLIB is usually a concatenation of datasets containing already prepared tables. The output ddname for tables is called ISPTABL. When you change a table, it must be pointed to by the ddname ISPTABL. Most often, the ISPTABL ddname will point to only one partitioned dataset. Command tables are certain members of an ISPF table dataset. Command table members have a very specific naming convention. In order for a member to be a command table the last four letters of its name must be "CMDS". The APPLID of the ISPF application must be the beginning of the member name. For example, if the applid of the current application is "ISR", then the command table entry governing that application has to be named "ISRCMDS". If the application name is "GIM", then the governing command table must be called "GIMCMDS". There is an ISPF function whose specific purpose is to change command table entries. In most installations, this function is 3.9 from the standard PDF menu. Upon entry, you'll see a screen that asks you for the applid you want to look at. You just enter the applid name alone (for example: ISR). The function then looks for a member in your ISPTABL ddname concatenation that is called ISRCMDS. Then it will display a list of the current table entries for that application. There is one catch. A command table that is currently being used by your ISPF/PDF session is enqueued upon; it may be browsed (in ISPF version 3.2 or later), but it cannot be changed. I have a certain trick to get around this problem. Suppose I want to change the ISRCMDS table. Under ISPF 3.9, this table (and ISPCMDS too) are being enqueued upon by ISPF and cannot be changed by ISPF 3.9. I create an exact copy of the ISRCMDS member (using ISPF 3.3 member copy) and call it XSRCMDS. When the ISPF 3.9 entry screen asks me for the applid, I enter "XSR". See Figure 1. This gives me the first XSRCMDS member in the ISPTABL ddname concatenation. Since XSR is not a currently used ISPF application, I can change the XSRCMDS member by adding and deleting table entries as I please. Then I rename ISRCMDS to another name, make a copy of XSRCMDS called ISRCMDS, and I make sure the dataset is at the top of my ISPTLIB ddname concatenation. For the new table to become active I just get all the way out of ISPF, and go back into ISPF again. If I want to make more changes to the table, my XSRCMDS member is still an exact copy of ISRCMDS, so I am still properly positioned to make further changes. See Figures 2 and 3. Our initial goal in speeding up our work is not to require panel entry to get to a function. Figure 2 illustrates some SELECT statements that may be found in the ISPF main menu panel called ISR@PRIM. Figure 3 shows how these same SELECT statements can be converted into direct commands, so you can quickly access each function without having to go through panels first and interrupting your work. Now that we have an idea of how to change table members and table entries, we'll discuss the kinds of changes we might make. Our aim is to enhance our ISPF sessions under TSO, so that access to our tools becomes more quick. See Figure 3 for an illustration of what I've done to immediately add power to my own ISPF sessions. My own scheme for adding commands is to prefix an "I" to a normal ISPF function. For example, if I want to create a command to duplicate ISPF 3.2 dataset manipulation and inquiry, I name the command "I32". That makes the command easy to remember, and it does not usually conflict with other ISPF and TSO commands. Please see Figure 3 for more specific details of what I've done. Remember that I've copied IBM's SELECT statements from IBM's panels, and the exact wording of the statements might depend on which release of ISPF you are running. When you change releases, you have to review your existing command tables to make them correspond to IBM's new panels. I always make my changes to a copy of the IBM-supplied command table from the current release of ISPF. Space is short and I have to end now. Please use the figures and do what you can to improve the state of life at your place. Best of luck. See you next month. * * * * * * * * * * * * * * * * * * * * * FIGURE 1. Command table edit entry panel from ISPF. This panel is accessed from the PDF main menu by entering, "3.9". The bottom of the panel contains explanatory instruction written by IBM, as is illustrated. ------------------------ COMMAND TABLE UTILITY ------------------------- COMMAND ===> ENTER/VERIFY APPLICATION ID BELOW: APPLICATION ID ===> XSR The name of the command table to be processed is formed by prefixing the application id to the string 'CMDS'. For example: APPLICATION ID ===> TST results in a command table name of 'TSTCMDS'. * * * * * * * * * * * * * * * * * * * * * FIGURE 2. This is the SELECT service portion of the main ISPF/PDF menu panel named ISR@PRIM. This part of the ISR@PRIM panel defines options or services that may be selected from the command line of the panel. You are able to get into the different options allowed, because these invocation definitions are present in the "selection" part of the ISR@PRIM panel. Please note that you can only get to these options from within the ISR@PRIM panel, but from nowhere else within ISPF or PDF. See Figure 3, which shows how these entries may be transformed into direct commands that may be executed from any ISPF command line while in application "ISR". &ZSEL = TRANS( &ZQ 0,'PANEL(ISPOPTA)' 1,'PGM(ISRBRO) PARM(ISRBRO01)' 2,'PGM(ISREDIT) PARM(P,ISREDM01)' 3,'PANEL(ISRUTIL)' 4,'PANEL(ISRFBA)' 5,'PGM(ISRJB1) PARM(ISRJPA) NOCHECK' 6,'PGM(ISRPTC)' 7,'PGM(ISPYXDR) PARM(ISR) NOCHECK' 8,'PANEL(ISRLPRIM)' 9,'PANEL(ISRDIIS)' 10,'PGM(ISRSCLM) NOCHECK' F,'PANEL(IFAMU01) NEWAPPL(FAXE)' O,'PANEL(NEWPNL) NEWAPPL(NONI)' P,'PANEL(PDS@PRIM)' C,'PGM(ISPTUTOR) PARM(ISR00005)' T,'PGM(ISPTUTOR) PARM(ISR00000)' ' ',' ' X,'EXIT *,'?' ) * * * * * * * * * * * * * * * * * * * * * FIGURE 3. This is a sample of a modified ISPF command table XSRCMDS which is copied to the member ISRCMDS of the table library pointed to by the ISPTABL ddname in ISPF under TSO. Notice how SELECT statements in this table were copied from SELECT definitions that came from ISPF panels. See Figure 2 for comparison. The commands in this table are much more easily accessible to an ISPF user. You don't have to start from the ISR@PRIM panel to use these commands. You can enter them from any ISPF command line. COMMAND TABLE - XSRCMDS ----------------------------------- ROW 36 TO 42 OF 79 COMMAND ===> SCROLL ===> CSR INSERT, DELETE, AND CHANGE COMMAND ENTRIES. UNDERSCORES NEED NOT BE BLANKED. ENTER END COMMAND TO SAVE CHANGES OR CANCEL TO END WITHOUT SAVING. VERB T ACTION DESCRIPTION '''' SDSF 0 SELECT PGM(ISFISP) NEWAPPL(ISF) INVOKE SDSF DIRECTLY FROM ANY ISPF COMMAND LINE. '''' SMPE 0 SELECT PGM(GIMSTART) PARM(&ZCMD) NOCHECK NEWAPPL(GIM) INVOKE SMP/E ISPF INQUIRY DIRECTLY FROM CMD LINE. '''' PDE 0 SELECT PGM(PDSE) PARM(PDSE &ZPARM ISPMODE) RECURSIVE EXECUTION OF PDSTOOLS (SYSPROG UTILITIES) '''' P84 0 SELECT PGM(PDS84) PARM(PDS84 &ZPARM ISPMODE) RECURSIVE 'ON-TOP' EXECUTION OF PDS VERSION 8.4 '''' BOTTOM 3 ALIAS DOWN MAX ALLOW SCROLL TO BOTTOM TO BE ABBREVIATED, "BOT". '''' RIGHT 2 SETVERB SCROLL RIGHT - ALLOW ABBREV TO 2 CHARACTERS, "RI". '''' LEFT 2 SETVERB SCROLL LEFT - ALLOW ABBREV TO 2 CHARACTERS, "LE". '''' I0 0 SELECT PANEL(ISPOPTA) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 0 '''' I1 0 SELECT PGM(ISRBRO) PARM(ISRBRO01) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 1 '''' I2 0 SELECT PGM(ISREDIT) PARM(P,ISREDM01) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 2 '''' I3 0 SELECT PANEL(ISRUTIL) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 3 '''' I31 0 SELECT PGM(ISRUDA) PARM(ISRUDA1) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 3.1 '''' LIBRARY 3 SELECT PGM(ISRUDA) PARM(ISRUDA1) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 3.1 - INVOKE AS "LIB" '''' I32 0 SELECT PGM(ISRUDA) PARM(ISRUDA2) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 3.2 '''' DATASET 3 SELECT PGM(ISRUDA) PARM(ISRUDA2) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 3.2 - INVOKE AS "DAT" '''' I33 0 SELECT PGM(ISRUMC) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 3.3 '''' I34 0 SELECT PGM(ISRUDL) PARM(ISRUDLP) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 3.4 . . . . . data omitted for brevity . . . . . '''' I314 0 SELECT PGM(ISRSFM) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 3.14 '''' I4 0 SELECT PANEL(ISRFPA) RECURSIVE 'ON-TOP' EXECUTION OF ISPF 4 '''' I5 0 SELECT PGM(ISRJB1) PARM(ISRJPA) NOCHECK RECURSIVE 'ON-TOP' EXECUTION OF ISPF 5 . . . . . data omitted for brevity . . . . . '''' I10 0 SELECT PGM(ISRSCLM) NOCHECK RECURSIVE 'ON-TOP' EXECUTION OF ISPF 10 '''' TUTORIAL 2 SELECT PGM(ISPTUTOR) PARM(ISR00000) RECURSIVE 'ON-TOP' EXECUTION OF ISPF TUTORIAL - AS "TU".