MVS TOOLS AND TRICKS OF THE TRADE October 1992 Sam Golob MVS Systems Programmer sbgolob@cbttape.org SMP TOOLS YOU SHOULD HAVE: PART II - A CLIST TO RUN SMP/E IN THE FOREGROUND. Sometimes you can get a lot of work done by taking advantage of a few simple ideas. It is possible to save yourself a lot of time with some very simple mechanisms that take just a few minutes to install. Last month, we talked about one such idea--a simple CLIST that is very helpful for SMP/E PTF inquiry. This month, we'll introduce another CLIST. This second CLIST invokes SMP/E in the foreground and is useful for CSI inquiries and quick changes. We shall call this CLIST, SMPETSO. Since SMPETSO works better when your TSO session is running in "session manager mode" under TSO/E, we'll show you how to set up the TSO session manager, with about three minutes of work. See Figure 1 for an coded example of the SMPETSO CLIST. Using SMPETSO, you can make "little inquiries" and SMP adjustments with much more ease than with SMP/E's ISPF inquiry system. You can also do small UCLIN changes (if you know what you're doing). You can immediately see the results by doing the corresponding "LIST" commands before and after each UCLIN. SMPETSO allocates the SMP/E log, so that all activities are chronicled there. SMPETSO actually runs the SMP/E program GIMSMP as though it were a batch job. The difference is that you have to enter all of the SMP/E 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. SMPETSO displays GIMSMP's normal response. Then you type other commands. For example, you might type: "LIST MOD (IFG0194K) ." You have to use strict SMP syntax, with periods and all. The result is displayed at the terminal. When you've finished, 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. From my travels, I've been extremely surprised about people's ignorance of the session manager, even among IBM'ers. See Figure 2 for simple information on invoking the TSO/E session manager in your logon procedure. 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 "ordinary" 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. Our SMPETSO CLIST frequently allows you to do much more than the IBM-supplied SMP/E ISPF inquiry. For example, we can look at three or four SMP entries at once, such as MOD, MAC or SYSMOD entries. The SMP/E ISPF cross-zone query 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 entries. Using the SMPETSO CLIST, you can list as many entries with one inquiry as you feel like, just as in a batch job. For example, try doing the equivalent of the command: "LIST MOD(IFG0194A IFG0194F)." using the SMP/E ISPF cross zone inquiry. If you're only looking in one zone, you'll have to admit that the SMPETSO CLIST is better. See Figure 3 for sample output of this command. This SMPETSO CLIST has been very helpful to me over the years. Take a few minutes to set it up and use it, and it can be just as useful to you. Good luck. I'll see you next month. * * * * * * * * * * * * * * * * * * * * * * * FIGURE 1. THE SMP/E INQUIRY CLIST. WE'LL CALL THIS CLIST "SMPETSO". This CLIST invokes SMP/E in the foreground under TSO 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 2 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 2. 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 can be viewed by either scrolling, or printing with the SMCOPY TSO command. TSO Session Manager output is 255 characters wide. Every TSO/E release includes software for session manager mode, and help to use 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 for further details.) //PROCNAME EXEC PGM=ADFMDF03,PARM='SM(IKJEFT01,Y),%LOGCLST', // DYNAMNBR=100 instead of: //PROCNAME EXEC PGM=IKJEFT01,PARM='%LOGCLST',DYNAMNBR=100 * * * * * * * * * * * * * * * * * * * * * * * Figure 3. SAMPLE OUTPUT OF AN SMP/E COMMAND USING SMPETSO. The "SET BDY(XRS003)." command to look at target zone XRS003 has been omitted for the sake of brevity. list mod(ifg0194a ifg0194f). LIST MOD(IFG0194A IFG0194F). DATE 92.236 TIME 15:21:09 GIMSMP LVL 15.1.19 SMPLIST OUTPUT - NOW SET TO TARGET ZONE XRS003 PAGE 0001 LIST MOD(IFG0194A IFG0194F). DATE 92.236 TIME 15:21:09 GIMSMP LVL 15.1.19 SMPLIST OUTPUT - NOW SET TO TARGET ZONE XRS003 PAGE 0002 XRS003 MODULE ENTRIES NAME IFG0194A LASTUPD = HDP3320 TYPE=ADD LIBRARIES = DISTLIB=AOSD0 FMID = HDP3320 RMID = UY69467 TALIAS = IFG0204A IFG0554A LMOD = IFG0194A IFG0194F LASTUPD = HDP3320 TYPE=ADD LIBRARIES = DISTLIB=AOSD0 FMID = HDP3320 RMID = UY79106 TALIAS = IFG0554F LMOD = IFG0194A DATE 92.236 TIME 15:21:09 GIMSMP LVL 15.1.19 SMPLIST OUTPUT - NOW SET TO TARGET ZONE XRS003 PAGE 0003 LIST SUMMARY REPORT FOR XRS003 ENTRY-TYPE ENTRY-NAME STATUS MODULE IFG0194A STARTS ON PAGE 0002 MODULE IFG0194F STARTS ON PAGE 0002 GIM20501I LIST PROCESSING IS COMPLETE. THE HIGHEST RETURN CODE WAS 00.