MVS TOOLS AND TRICKS OF THE TRADE January 1993 Sam Golob MVS Systems Programmer sbgolob@cbttape.org Sam Golob is a Senior Systems Programmer PUTTING YOUR TOOLS TOGETHER - PART II. Last month, we began a "miniseries" with the emphasis upon consolidating your tools. It's important to possess tools. It's just as important to mobilize those tools quickly when you have a problem to solve. Much of a system programmer's wasted time comes from the following scenario: You are solving half a problem with one tool. In order to go further, you have to use another tool that has its own different environment. Possibly the first tool is online, a TSO command. The second tool can only be run easily via a batch job. There are setup delays, possibly of several minutes, in between. It would certainly be better if the two parts of the solution were brought closer together. As we detailed last month, a powerful way to bring tools closer to the programmer is ISPF command table customization. If an application can be invoked instantly through the execution of a single command, much of a user's time is saved by eliminating complicated setups. This month, we'll go to the second stage and talk about some experiences using a "tool package". In a tool package, a large number of utility functions are available within a single environment, to throw a great variety of fixup and diagnosis aids at one problem. Most tool packages are vendor products. The format of this column dictates that I not get "political". I want the largest group of readers possible to get a large amount of information they can use right now, through the material they read here. I don't want to push one vendor's product over another, because many MVS sites aren't licensed for a particular vendor's product. We would like all MVS sites to gain good benefit from what is written here, not only those licensed for a particular product. On the other hand, leaving out any mention of tool packages would be too great a loss. With the tool packages I use, I am probably four times more efficient time-wise than the average systems programmer. My personal experience in this area is just too important to skip over. But my own favorite tool package has two versions--a free public version that any shop can install, and a vendor version that is more than twice as powerful. By using this pair of tool packages as an illustration, we can show the benefits to be gained, and at the same time make it possible for any shop to put much of this knowledge into actual practice. I am using PDSTOOLS (formerly PDS/E Sysprog Utilites) from Serena International as my tool package example here. The reason is twofold. First, I have extensive experience over a period of seven years in using that product. PDSTOOLS is the cornerstone of my own efficiency as an MVS systems programmer. I use PDSTOOLS during 95 percent of my working day. Second, there exists a more primitive free version called PDS version 8.4 that is on the CBT MVS Tape (File 182) obtainable from Naspa (414-423-2420) or from SPLA (305-284-6257). We thus have an opportunity for everyone in any MVS shop to try what we're talking about for themselves. There's one more thing I have to say before we go to specific details. Having more than one tool package is not always redundant. In fact it can be very effective for systems programmers, because several different tool packages can often be made to work efficiently together. This is in line with our thinking here. Please refer to a relevant article in the March 1992 issue of "Technical Support" called "Software Integration Improves Productivity and Performance" by Jeff Furman. That entire article shows how various combinations of vendor tool packages add up to a greater whole than the sum of their separate parts. WHERE A TOOL PACKAGE SPEEDS THINGS. A tool package like PDSTOOLS saves time in two ways. First, it duplicates functions available more awkwardly elsewhere. For example, with PDSTOOLS it is trivial to create any number of aliases for a pds member (source or load module). If it is necessary to create an alias for a load module, the last thing you want to do is to fool with the linkage editor. Just enter a command and you're done. PDSTOOLS gives that to you. There's no anguish--just a very simple operation: "ALIAS memname aliasnme". The second thing that a package like PDSTOOLS will do is to supply function that is not available elsewhere. Suppose that you really have to use the linkage editor in adding an alias name to an existing load module. PDSTOOLS will effortlessly generate accurate re-linkedit JCL from an existing load module in a library. That functionality is not readily available elsewhere. PDSTOOLS will effortlessly write the generated JCL to a dataset, where you can edit it and add control cards to your heart's content. You don't have to use the linkage editor manual to reconstruct your original module. It's easy with PDSTOOLS to obtain linkage editor control cards that preserve your module in a new pass through the linkage editor. In a day's work, the result of using PDSTOOLS is the saving of large amounts of time and anguish while doing simple repetitive processes. PDSTOOLS even eliminates the repetition entirely sometimes. Through the concept of "member groups" in place of single members, PDSTOOLS allows one command to operate the same way at assembler speed, over a carefully selected group of many pds members. The result is often twenty- or thirty-fold time savings! You see that a package like this pays for itself very quickly. As impressive as these illustrations are, they truly do not even begin to show the main advantage of PDSTOOLS in time saving. The tool package PDSTOOLS enables a system programmer to literally throw hundreds of tools at one problem in one place, dealing with many datasets. Judicious entries to your ISPF command tables, as illustrated last month, allow even more tools to be brought into juxtaposition with the many integrated activities going on in PDSTOOLS alone. When you get good at this stuff, you'll be a wonder of wonders in your shop much of the time. We'll present a large example to give a hint at this. I must emphasize that you're only getting a small taste. I can easily talk for two weeks of eight-hour days on this subject without much repetition. A tool package like PDSTOOLS is really essential. It opens up a new world for you. PUTTING THE TOOL PACKAGE TO USE. Let's say we've got some trouble with our working copy of SYS1.LINKLIB which, of course, is in the system linklist. We're getting S806 abends for some of the modules on our XA or ESA system. We're pretty sure that the members are there, even though the S806 abend seems to tell us that they're not there. The first thing to try, of course, is the operator command: "F LLA,REFRESH". If the reason for not finding the modules is that LLA doesn't know about them, this will cure the problem. Suppose that doesn't work. Trying to execute the programs still results in the S806 abend. If you have PDSTOOLS, there are some obvious paths to follow. The first thing to try is to get into the dataset by entering the TSO command: "PDSTOOLS SYS1.LINKLIB". If you have the free PDS package, you enter: "PDS SYS1.LINKLIB". From now on, I'll assume you have the vendor package. If our actions can't be done with the free package, I'll tell you so. Once you're in PDSTOOLS pointing to the dataset, enter the subcommand: "USAGE ALL " or "U A". You'll see a detailed display of the characteristics of your copy of SYS1.LINKLIB, including the number of its extents. If the secondary extent size is nonzero and there are secondary extents present, there is a possibility that an extent was added after IPL. Since the extents of the linklist datasets are made known to the system only at IPL time, the system will not know about any modules found in a new secondary extent of SYS1.LINKLIB and you'll get a S806 abend if you try to execute them. See Figure 1 which shows the output of "USAGE ALL". Among the many things you'll see, there is a CCHHR and TTR description of the dataset's extents. Then type "MEMLIST : " which means, "take a member list of all the dataset's members. Type "RIGHT" or PF11 to get the alternate display which lists all the member TTR starting locations. Finally type: "SORT TTR" which will sort the full member list in TTR order. Type "U A" again to redisplay the TTRs of the newest extents. Write them down. Then type MEMLIST again to redisplay the sorted list of members. By going down toward the bottom of the sorted member list, you can easily spot which members are in the second, third, or fourth extents. If the members in the last extent are the same ones getting the S806 abends, we're getting warm. Confirmation can be done as follows: Run the failing job with a STEPLIB DD card pointing to SYS1.LINKLIB. STEPLIB does a directory search for the module, and bypasses the linklist search. If the STEPLIB search works, circumvent the problem using the STEPLIB DD card, until you do an IPL to inform the system of the new linklist extents. Suppose we still have trouble. With the PDSTOOLS product at the Release 3.1.0 level or higher, we can issue: "FINDMOD modulnam" from the command line, and PDSTOOLS will issue its own module searches and display the results. The FINDMOD command of PDSTOOLS will display all places on the working system where the module is found, or it will tell us that it is not found. If we want to look at all the found versions of the module, we issue: "FINDMOD modulnam CHANGE LIB(1)" to go to the library of first occurrence, or LIB(2) to go to the library of second occurrence, and so on. A MEMLIST display on the module name in the new library will show the linkedit date and some other telltale characteristics of that version of the module. An ATTRIBute display on the module will show linkedit attributes RENT or REUS and so forth, displaying the size and entry point of the module also. Entering "HISTORY modulnam" will display the linkedit IDR records of all the CSECTs and optionally, will display the assembler or compiler IDR records. The DISASM command will disassemble the module quickly. The "DISASM modulnam REASM" command will disassemble the module in re-assemblable format, wrapping correct assembly and linkedit JCL around the disassembled source code. Getting back to our problem, the VERIFY command against our module will show us any abnormalities or errors in the structure of the module, or in its ability to be fetched. A VERIFY command against all members of the load library will reveal overall weaknesses in the library. This "VERIFY : " command against the whole library will show all the modules having bad internal structure. After running all these tests, we can usually zero in on the source of the difficulty. You can now see how PDSTOOLS can throw dozens of different actions, tools and tests against a single library, or a single module name. These things can all be done in a very few minutes. Hundreds of other dataset-related problems can be similarly dispatched in very short order. This is what I'm trying to show; this is the advantage of having and using a top-notch tool package. In truth, PDSTOOLS possesses more than 1500 individual utility functions that can be applied to a great variety of common and uncommon problems. The clarity of proof that a problem situation exists is often unparalleled. PDSTOOLS will often demonstrate the existence and cause of a bad situation beyond all doubt. PDSTOOLS can often fix the problem also. A simple case of this is when a load module which is not re-entrant was linkedited by mistake with the RENT attribute. As a result, it does not function properly when it is executed. The ATTRIB command of PDSTOOLS will reveal the existence of the problem with its display. But the "ATTRIB modulnam NORENT NOREUS" command will actually remove the re-entrancy and reusability attributes from the directory entry of the load module, thereby curing the problem in an instant by fixing the linkedit mistake. I don't have space to say any more now, but I hope that I've shown a tiny bit of the usefulness of a tool package. If you're stimulated to try PDS 8.4, PDSTOOLS, or any other tool package, I've accomplished my purpose here. Good luck and much success. I'll be seeing you next month. * * * * * * * * * * * * * * * * * * * * * * FIGURE 1. PDSTOOLS "USAGE ALL" display, to show the structure and characteristics of a dataset, based on the contents of its VTOC entry, or FORMAT 1 DSCB. Please note the wealth of detail. This command can be shortened if "USAGE" is entered without any parameters. In that case the 'extent' detail, starting with the PDS184I messages, is left out. Note that in the case of a dataset having more than 3 extents, when it is necessary to have a FORMAT 3 DSCB to describe the additional extents, PDSTOOLS will format this FORMAT 3 DSCB for you also. All this material can be written out from the PDSTOOLS log, to a disk file or a SYSOUT class of your choice. PDS300A ENTER OPTION -- DSN=SYS1.LINKLIB,VOL=SER=MRS002 MEM= >u all PDS200I DISP UNIT RECFM LRECL BLKSIZE ALLOCTRK FREETRK SECONDARY FREEDIR PDS200I SHR 3390 U 0 32760 4X 1688 638 112 TRK 327 PDS223I This is a linklist dataset PDS224I This data set is APF authorized PDS180I Data set: CREATED EXPIRES LAST USE UPDATED LASTUSE FIRSTUSE PDS180I 1991/06/17 **NONE** 1992/11/19 1991/07/10 DMV0016 DMV0003B PDS181I Extents in tracks: 1352, 112, 112, 112 PDS182I Tracks: ALLOCATED USED FREE EXTENTS PDS182I 1688 1050 638 4 PDS183I Directory: BLOCKS USED FREE TRACKS MEMBERS ALIASES PDS183I 840 513 327 19 3043 559 PDS184I EXTENT UCB LO TT-HI TT TRACKS LOW CCHH-HIGH CCHH BOUNDARY PDS184I ------ --- ----- ----- ------ ----------- ----------- -------- PDS184I 0 868 00.00 05.47 1352 05.F3.00.00 06.4D.00.01 TRK PDS184I 1 868 05.48 05.B7 112 00.1A.00.03 00.21.00.09 TRK PDS184I 2 868 05.B8 06.27 112 00.21.00.0A 00.29.00.01 TRK PDS184I 3 868 06.28 06.97 112 00.36.00.08 00.3D.00.0E TRK PDS185I Format 1 DSCB at 0456000128 PDS185I 0 4 8 C 10 14 18 1C 20 24 28 2C 30 34 38 3C 40 44 PDS185I SYS1.LINKLIB 103B$....$.y......DMV0016 PDS185I EEEF4DCDDDCC44444444444444444444444444444444FFFC50B0050A000000CDEFFFF4 PDS185I 2821B3952392000000000000000000000000000000001032B0F01B0800040044500160 PDS185I 48 4C 50 54 58 5C 60 64 68 6C 70 74 78 7C 80 84 88 PDS185I DMV00*........{."8.....bh.......y1....3...(........................... PDS185I CDEFF504000000C07F00000880070124AF0000F0004000001000200000200020005002 PDS185I 44500C1400002001F8000002800049468101053006D01110A03010912010A09014605D PDS186D LOC NAME VALUE DESCRIPTION PDS186I --- ---- ----- ----------- PDS186I 00 DS1DSNAM SYS1.LINKLIB PDS186I 2C DS1FMTID F1 FORMAT IDENTIFIER PDS186I 2D DS1DSSN F0F3C25B00BF DATA SET SERIAL NUMBER PDS186I 33 DS1VOLSQ 1. VOLUME SEQUENCE NUMBER PDS186I 35 DS1CREDT 5B00A8 CREATION DATE PDS186I 38 DS1EXPDT 000000 EXPIRATION DATE PDS186I 3B DS1NOEPV 4. NUMBER OF EXTENTS ON VOLUME PDS186I 3C DS1NOBDB 0. NUMBER OF BYTES USED IN LAST DIRECTORY BLOCK PDS186I 3D 00 RESERVED (ONE BYTE) PDS186I 3E DS1SYSCD C4D4E5F0F0F1F640C4D4E5F0F0 PDS186I 4B DS1REFD 5C0144 DATE LAST REFERENCED PDS186I 4E DS1SMSFG 00 SYSTEM MANAGED STORAGE FLAGS PDS186I 4F DS1SCXTF 00 SECONDARY SPACE EXTENSION FLAG PDS186I 50 DS1SCXTV 0. SECONDARY SPACE EXTENSION VALUE PDS186I 52 DS1DSORG 0200 DATA SET ORGANIZATION PDS186I 54 DS1RECFM C0 RECORD FORMAT PDS186I 55 DS1OPTCD 01 OPTION CODE PDS186I 56 DS1BLKL 32,760. BLOCK LENGTH PDS186I 58 DS1LRECL 0. LOGICAL RECORD LENGTH PDS186I 5A DS1KEYL 0. KEY LENGTH PDS186I 5B DS1RKP 0. RELATIVE KEY POSITION PDS186I 5D DS1DSIND 82 DATA SET INDICATORS PDS186I 5E DS1SCALO 88000070 SECONDARY ALLOCATION PDS186I 5E 112. TRK SECONDARY EXTENTS PDS186I 62 DS1LSTAR 041924 TTR OF LAST USED TRACK AND BLOCK ON TRACK PDS186I 62 1,049. TRACKS INTO THIS DATA SET PDS186I 65 DS1TRBAL 18,088. BYTES REMAINING ON LAST TRACK USED PDS186I 67 F100 RESERVED (TWO BYTES) PDS186I 69 DS1EXT1 0100.05F30000.064D0001 EXTENT 1 1352 TRACKS PDS186I 73 DS1EXT2 0101.001A0003.00210009 EXTENT 2 112 TRACKS PDS186I 7D DS1EXT3 0102.0021000A.00290001 EXTENT 3 112 TRACKS PDS186I 87 DS1PTRDS 045600052D CCHHR OF ANY ASSOCIATED FORMAT 2 OR 3 DSCB * - - - - - ABBREVIATED BECAUSE OF LACK OF SPACE - - - - - * (SIMILAR INFORMATION ON THE FORMAT 3 DSCB'S FOLLOWS, BECAUSE THIS DATASET HAS MORE THAN 3 EXTENTS. ) * * * * * * * * * * * * * * * * * * * * * * FIGURE 2. PDSTOOLS display of several commands that can be brought to bear on one load module, or one library. The point is that a tool package such as PDSTOOLS can integrate dozens of functions, and focus them on one problem area. Thus it is an excellent means of "putting your tools together". Illustrated is the load module ACCOUNT from SYS1.LINKLIB. The PDSTOOLS subcommands ATTRIB, HISTORY, and VERIFY are shown, as well as a VERIFY run on the entire SYS1.LINKLIB load library. There are literally dozens of other functions within PDSTOOLS which can be used to investigate a single load module, or the entire library. - DSN=SYS1.LINKLIB,VOL=SER=MRS002 MEM=ACCOUNT >attrib account PDS020I ACCOUNT Attributes are: RENT, REUS PDS103I Entry point at 000000 -- IKJEFA00 PDS104I Module length 001450 -- 6K PDS064I Last link-edited on 91/03/20 by LKED 566528408 V03 M01 >history account ** HISTORY ACCOUNT PDS062I User-supplied update history by CSECT - IKJEFA00 90/06/29 RSI93482483 IKJEFA01 90/06/29 RSI90760150 PDS064I Last link-edited on 91/03/20 by LKED 566528408 V03 M01 >verify account ** VERIFY ACCOUNT PDS111I 8 physical blocks were input PDS112I 5,200 characters in the largest physical block PDS113I 741 characters per average physical block >verify : (run against the entire SYS1.LINKLIB) PDS006I End of data set PDS111I 25,336 physical blocks were input PDS112I 32,760 characters in the largest physical block PDS113I 1,333 characters in the average physical block PDS114I 28 tracks could be regained by compressing this data set PDS115I 3,043 members were checked PDS130I The following is a track usage map of the data set PDS130I DDDDDDDDDDDDDDDDDDDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX PDS130I XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........... PDS130I X...........XXXXXXXXXXXXXXXXXL.............................. PDS130I ............................................................ PDS130I ............................................................ PDS130I ............................................................ PDS130I ............................................................ PDS130I ............................................................ PDS130I ............................................................ PDS130I ............................................................ PDS130I ............................................................ PDS130I ............................................................ PDS130I ............................................................ PDS130I ........