MVS TOOLS AND TRICKS OF THE TRADE September 1992 Sam Golob MVS Systems Programmer sbgolob@cbttape.org SOME SMP TOOLS YOU SHOULD HAVE. I'm surprised at how a few incredibly simple tools can go a long way. Today, I'd like to talk about two very basic tricks in the SMP/E area and their simple implementations. These will make life much easier for you when you do system maintenance or investigate problems. Idea number one: Wouldn't it be nice to always have any PTF or usermod instantly available for inquiry? This is not far from your reach. It's as close as one dataset, your SMPPTS. If you have the disk space, it may not be a bad idea to let your PTS dataset grow to 4000 or 5000 tracks or more. (The only disadvantage is that APPLY GROUP or GROUPEXTEND runs take considerably more time.) The PTS, in SMP/E, contains the actual text of received sysmods as members of a partitioned dataset. This includes the text of all cover letters, as well as all modification control statements. The PTS dataset is a gold mine to you, as a database for inquiry. If you have some simple way of browsing a member of this pds, you can instantly investigate the mechanism of how any sysmod works, as well as all of the extra documentation that IBM wants you to know about. You will be looking at the actual sysmod itself. There's a simple-to-use and powerful browsing tool called REVIEW on the CBT MVS Utilities Tape. REVIEW is a TSO command that doesn't depend on ISPF. REVIEW can be called from a clist or a REXX exec. REVIEW, which is found in source code on File 134, and in load module form on File 135 of the CBT Tape, gives you instant ability to look at PTFs, and has multiple advantages over "ISPF BROWSE". See Figure 1 for a simple clist called "PTF". This clist can do wonders for you if you'll try it and use it. Why is REVIEW better than ISPF browse? First, it's much faster. For fixed blocked data, if you have a large dataset, it's possible to go down to the bottom or "DOWN 100000" lines by figuring out the destination TTR instead of by feeling your way down record by record. REVIEW is smart enough to do the math. ISPF browse isn't. If you say "BOTTOM" or "DOWN M" when REVIEWing a 400000 line fixed blocked dataset, you're there almost instantly. Try doing that with BROWSE, the first time you're looking at the dataset, and see how long you have to wait. Even in cases when it's impossible to do the math, and REVIEW "knows" it, REVIEW is better than BROWSE. This can happen when you're REVIEWing a variable blocked dataset or doing a FIND command for a string of data. REVIEW can't get there instantly by doing calculations, because it has no way of knowing how big the blocks are, or in a string FIND, it can't skip over any of the data. In that case, REVIEW will tell you how far it's gotten if you're tired of waiting. BROWSE won't. How? When REVIEW is searching through many blocks of data and hasn't updated the screen for you yet, all you have to do is press ATTENTION (or PA1) once. REVIEW will stop in its tracks, displaying exactly how far it has gotten. Re-issue the same "find" command (there's a RETRIEVE pfkey) and REVIEW will continue looking from there. There's no hint of such a facility in ISPF BROWSE. So I recommend a CLIST with two lines: "PROC 1 SYSM" is the first line, and "REVIEW 'SMPE.SMPPTS(&SYSM)'" is the second line. (Make sure you're pointing to your active PTS where the sysmods are.) If you name the clist "PTF" and put it in a clist library that's part of your TSO SYSPROC ddname concatenation, all you have to do to inquire on PTF UY78912 is to type: "TSO %PTF UY78912" under ISPF and you've got it. When you finish looking at the PTF and press PF3, you're back in ISPF where you were before. This will also work in native TSO, because REVIEW doesn't need ISPF. I recommend creating a pfkey in ISPF called "TSO". Then, to inquire on the PTF, you just type: "%PTF UY78912" and press the "TSO" pfkey. There isn't anything much more simple or easy to set up, and this is very handy. One more thing. Please make sure you've installed the newer version of REVIEW from Greg Price that's on File 134 of the CBT tape, rather than an older version. The older version will suffice for the PTF inquiry purpose, but it doesn't have the "speed functions" we mentioned above. Also, suppose you missed on the PTF number and typed one that you don't have. REVIEW will display it's "null member" screen. With Greg's version of REVIEW, you needn't worry. Just type the command: "DIR" on the command line, and you get a full directory list of the PTFs in your SMPPTS dataset. There's an 8-byte command field at the top of this member list which serves a "locate" function for the member list. Just type "approximately" the PTF number in this field, and the list will be positioned close to where you want to go. Type an "S" next to any member name, and you REVIEW it. If you're running REVIEW under ISPF and the ISPF environment is there, a "B" (instead of an "S") next to the member name will ISPF BROWSE the member. An "E" will ISPF EDIT it. Of course, you don't want to edit IBM's PTFs, but you can use "CREATE" under EDIT to extract parts of the PTF or to copy its cover letter to another dataset. A SECOND TOOL - A CLIST TO RUN SMP/E IN THE FOREGROUND. See Figure 2 for a clist that runs SMP/E in the foreground at your TSO terminal under native TSO. This is "idea number two". Which this clist, you can make many "little inquiries" and SMP adjustments with much more ease than with SMP/E's ISPF inquiry system. You can carefully do small UCLIN adjustments (if you know what you're doing), and you can immediately look at the results by doing the corresponding "LIST" commands, before and after the UCLIN. This clist allocates the SMP/E log, so that your activities are chronicled there. When you use this clist, which we can call "SMPETSO" for this discussion, you are actually running the SMP/E program GIMSMP as though it were a batch job. The difference is that you have to enter all of the commands (normally in SMPCNTL) at your terminal. For example, after the clist starts running, you must type in a "SET BDY" command in order to start your work. The clist display's GIMSMP's normal response. Then you type your commands. For example, you might type: "LIST MOD (IFG0194K) ." You have to use strict SMP syntax, with periods and all. The result is displayed on your terminal. When you've finished, you type "/*" in column 1, and the GIMSMP program ends. Once you've used the SMPETSO clist for a while, you'll be amazed at how handy it is to have. I'd recommend using it for very simple things most of the time. It is intended for inquiries primarily, not for MASS APPLY! The capabilities of this CLIST are very much enhanced if you use the TSO session manager which comes with TSO/E. The TSO session manager gives you up-down-right-left scrollability under native TSO, and it preserves several thousand lines of TSO output in your running session. You aren't limited to just a screen full of data that you can't recover. In my travels, I've been extremely surprised about people's ignorance of the session manager, even among IBM'ers. See Figure 3 for simple information on invoking the TSO/E session manager in your logon procedure. The TSO session manager is extremely easy to set up. You just have to change the EXEC card in your TSO logon proc. Figure 3 is provided as a helpful hint. You can make the whole change in two or three minutes. If you are in TSO in session manager mode, and you want to change to the other mode, there is an authorized command called "SM" on the CBT Tape (File 119) that can be used to toggle back and forth between modes. If you have the SM command set up, you can instantly have TSO the way you like it. You can change modes with the flick of a finger. I am sure these tools will help you in your work, especially the simple PTF inquiry clist. It's great for looking at APAR letters while you're doing PE research, or when you're on the phone with IBM. The SMP/E execution clist allows you to do much more than the SMP ISPF inquiry, such as looking at the state of three or four entries at once. The SMP ISPF inquiry only allows you to see one entry at a time, and it's a lot of trouble to switch and look at 3 or 4 other ones. Not so with the SMPETSO clist. You can list as many entries in one inquiry as you feel like, just as in a batch job. But you don't have to wait as long for the answer. These two tools have stood me in good stead over many years. If you take an hour to set them up, they can do the same for you. Good luck. I'll see you next month. * * * * * * * * * * * * * * * * * * * * * * * Figure 1. THE "PTF" INQUIRY CLIST. This clist, which takes advantage of the capabilities of the "REVIEW" TSO command on the CMT MVS Tape (File 134 for source and File 135 for load), is extremely simple, but extremely useful. Assemble REVIEW from File 134 or copy the load module from File 135 and have fun. PROC 1 SYSM REVIEW 'SMPE.SMPPTS(&SYSM)' /* /* This assumes that your PTS dataset is called SMPE.SMPPTS. /* /* Assuming the member name of this clist is PTF, and it resides /* in a library in the SYSPROC ddname concatenation of your TSO /* session, you merely execute %PTF UY78912 to look at ptf UY78912. /* It's that simple. PF3 to end. You're back where you were. /* * * * * * * * * * * * * * * * * * * * * * * * FIGURE 2. THE SMP/E INQUIRY CLIST. WE'LL CALL THIS CLIST "SMPETSO". This clist invokes SMP/E in the foreground under TSO in exactly the same way as it would run in the background in batch. Input of commands and output of results go to the terminal. Since there might be quite a few lines of output, it is preferred to run this clist in TSO "session manager mode", which can preserve and print up to several thousand lines of TSO output. See Figure 3 on how to set up session manager mode for your TSO session. PROC 0 VOLID CSI('SMPE.GLOBAL.CSI') UNIT(DISK) TYPE(SYS1) NOLOG - SYSOUT LOGDISP(MOD) NOPTS LIST() /** YES OR NO **/ SET VOLID = XRS003 /* SMP-CONTROLLED PACK */ IF LIST = YES THEN CONTROL LIST ELSE IF LIST = NO THEN CONTROL NOLIST CONTROL PROMPT WRITE *********************************************************** WRITE * * WRITE * WELCOME TO THE SMP INQUIRY SYSTEM. THIS MEANS * WRITE * MAKE INQUIRIES ONLY ........ * WRITE * * WRITE *********************************************************** WRITE WRITE T Y P E = &TYPE WRITE WRITE FOREGROUND EXECUTION OF SMP/E WRITE WRITE SYSTEM DEFAULT ====> &TYPE WRITE WRITE TYPE = &TYPE MVS SP 4.1.0 DFP/ESA WRITENR ENTER DESIRED TYPE ====> READ ANS IF &LENGTH(&STR(&ANS)) ^= 0 THEN SET TYPE=&STR(&ANS) IF &TYPE = SYS1 THEN SET VOLID = XRS003 /* TARGET PACK */ IF &TYPE = SYS1 THEN SET DIST = SMPDL1 /* DLIB PACK */ WRITE WRITE YOU HAVE SPECIFIED &TYPE AS THE SYSTEM. WRITE TARGET = &VOLID ---- DISTRIBUTION = &DIST WRITE ERROR GO TO ENDALL ATTN GO TO ENDALL ALLOC FI(SMPLIST) DA(*) ALLOC FI(SMPCNTL) DA(*) ALLOC FI(SMPRPT) DUMMY IF &NOLOG = NOLOG THEN ALLOC FILE(SMPLOG) DUMMY /* NO SMP LOG */ ELSE ALLOC FI(SMPLOG) &LOGDISP KEEP DA('SMPE.GLOBAL.SMPLOG') IF &NOPTS ^= NOPTS AND TYPE = SYS1 + THEN ALLOC FI(SMPPTS) SH REUSE DA('SMPE.GLOBAL.SMPPTS') IF &SYSOUT = SYSOUT THEN ALLOC FI(SMPOUT) SYS(T) /* HELD CLASS */ ELSE ALLOC FI(SMPOUT) DA(*) CALL 'SYS1.LINKLIB(GIMSMP)' 'CSI=&CSI' ENDALL: ERROR OFF ATTN OFF FREE FI(SMPLIST SMPRPT SMPCNTL SMPLOG SMPOUT SMPPTS) END * * * * * * * * * * * * * * * * * * * * * * * Figure 3. SETTING UP TSO SESSION MANAGER IN YOUR TSO LOGON PROC. By changing the coding of the EXEC card slightly in your TSO logon procedure, you can invoke TSO in session manager mode. Session manager mode preserves several thousand lines of TSO output, which is scrollable. The output is also 255 characters wide, and may be printed using the "SMCOPY" TSO command. Every TSO/E system is equipped for session manager mode, and help for SMCOPY is shipped by TSO/E in SYS1.HELP. To use the TSO session manager, code the EXEC card of your TSO logon procedure as follows: (Refer to the "TSO/E Customization" manual.) //PROCNAME EXEC PGM=ADFMDF03,PARM='SM(IKJEFT01,Y),%LOGCLST', // DYNAMNBR=100 instead of: //PROCNAME EXEC PGM=IKJEFT01,PARM='%LOGCLST',DYNAMNBR=100