MVS TOOLS AND TRICKS OF THE TRADE DECEMBER 2006 Sam Golob MVS Systems Programmer P.O. Box 906 Tallman, New York 10982 Sam Golob is a Senior Systems Programmer. He also participates in library tours and book signings with his wife, author Courtney Taylor. Sam can be contacted at sbgolob@cbttape.org. Information about the CBT MVS Tapes can be found on the web, at http://www.cbttape.org. SYSTEM RECOVERY TOOLS - PART 2 This month we'll continue our study of how to recover from the various damages that can occur during the startup of an MVS system. Everybody knows that a damaged MVS system can normally be recovered only by having another MVS system (or maybe a VM system) which can access the system's disk packs. However, if the damaged system is partially up, sometimes it may be recovered using specialized tools that don't need a fully operational system to work. Today, we'll look at such tools, which for example, might allow you to edit files from raw TSO (i.e. "READY") mode, if ISPF isn't available, or which might allow you to fix a PARMLIB member if only a system console is available and TSO isn't there at all. You can easily see the advantage you can have, to use tools like these, if they have been previously installed and are now available. Last month, we took you through a quick tour of how an MVS system startup works. We need to know that, because if the startup gets interrupted at some stage, we have to know what's already there to use, and what's not yet there, and still unavailable. Then, to recover, we can pick an appropriate tool which can operate with the facilities that are already there, but which does not need the part of the system that is not there. So to quickly summarize, how does an MVS system start up? Basically, the idea is this. At IPL time, the system is IPLed from bootstrap records which have been previously loaded from a disk pack or perhaps from a tape, or even from a cd-rom. The bootstrap records look for a LOADxx member in SYS1.IPLPARM or SYS1.PARMLIB that will tell the fledgling system where the PARMLIBs are, and where the Master Catalog is. Once that information is available, the system can then proceed to look at the IEASYSxx member(s) of PARMLIB and the other PARMLIB members which will tell it how to start up. The names and locations of datasets essential to the next phase of the startup are found there. Finally, the startup is able to proceed and fill in all the data that is normally pointed to by the CVT area in storage, and once that has been done, the system can then operate relatively normally. That is a "quick summary" of how an MVS IPL works. When the IPL is interrupted or damaged at some stage, often the only recovery necessary, is simply to point the system to a corrected PARMLIB member, which will then be pointed to correct or corrected copies of the essential system datasets. But if any of those datasets are themselves damaged, then they either have to be physically fixed, or else (at least) the appropriate PARMLIB member has to be adjusted to re-point to a corrected or fixed copy of the damaged dataset. Making such an adjustment usually means possessing a tool that can either edit the PARMLIB member, or which can perform an IEBCOPY of a correct PARMLIB member from another pds somewhere, to the PARMLIB pds that's needed for the IPL. So for recovery purposes, we usually need a file editing tool which can work when most of the MVS system is not available. EDITING TOOLS, AND THE MINIMUMS THAT THEY NEED I always try and have a bunch of file editing tools available, which need a minimum of system resources. I think that the best file editors for recovery purposes are the ones that do not need MVS at all. There is a vendor product called "Stand Alone Edit" from New Era Software which will IPL on a standalone basis and do file editing, but that product is expensive. A free alternative, which works very well indeed, is ZZSA from Jan Jaeger. You can obtain and learn about ZZSA from the free CBT Tape collection, on Files 437 and 538. And you can get to the CBT Tape collection by doing a www.google.com search for the string "CBT Tape". The CBT Tape website will come out at or near the top of the search, and you don't need to be a "member of anything" or to have any password, to obtain the good materials available there. You can IPL ZZSA either from DASD (pre-loaded via ICKDSF), tape, card images loaded from a card reader, or from a cd-rom. When you IPL ZZSA, you need a system console available, and already there. In your IPL system configuration, please be sure to also include all the DASD volumes that you will want to fix or access. Once the IPL proceeds and stops, you then just press an interrupt on the console screen (such as the ESC key) and ZZSA will fire up on the screen. Please look at Figure 1 to see the ZZSA main menu. I think that the first thing you should do, upon starting ZZSA, is to execute the "0" option to list the attached devices. That operation will tell ZZSA where all your DASD volumes are, and it will speed up all the subsequent operations, such as editing a file. The rest of the operations can be found by "following your nose" and playing with the tool. If you really need to recover a slightly damaged MVS system but can't IPL it at all, then ZZSA could be your ticket to recovery. The ZZSA file editor is (of course) more limited than other file editors that were designed to run under operating systems. So you can use the ZZSA facilities to try and get your system IPLable. And then once the system comes up, at least partially, you can use some other file manipulation tools, which we'll describe now. IF TSO DOESN'T COME UP To guard against a situation where (perhaps) you don't have VTAM or even JES2, and TSO can't come up, you should install the TSSO product, from CBT Tape File 404. I have tested and run TSSO from File 404 on systems as recent as z/OS 1.7. TSSO (which is quite versatile, also including an Automated Operations part), at rock bottom, establishes a TSO-like line-mode environment in which input and output for TSO functions occurs through system console inputs and outputs. TSSO runs as a subsystem, and you assign a subsystem character to TSSO so it can accept its own subsystem commands. If you have JES up, you can start TSSO under SUB=JES2 or SUB=JES3. But if JES won't come up, you can start TSSO under SUB=MSTR and even then, it can still do most of its magic. For example, suppose the TSSO subsystem character is a question mark (?). Then when TSSO is up, even under the master subsystem, you can issue TSO line-mode commands from the system console, and get the PUTLINE outputs on the system console too. So if you enter the command, ?LISTD 'SYS1.LINKLIB', you'll get a LISTD output displayed for SYS1.LINKLIB on your console, and the full output will also show up in SYSLOG (assuming you have SYSLOG). You can give TSSO as much power as you want to, just as you can give your TSO userid and TSO session as much power as is needed. Instead of a TSO LOGON PROC, you make your TSSO startup PROC very similar, following the guidelines described in CBT File 404. You can authorize TSO commands under TSSO in the same ways as under TSO, using an Authorized Library STEPLIB DD, and a special IKJTABLS load module. (See CBT File 185 for details about that). Or you can APF authorize TSO commands under TSSO in the ordinary ways. You can also include the powerful free PDS product (CBT File 182 - load modules in Files 035 or 135) in the TSSO STEPLIB library, so you can run IEBCOPY using the PDS COPY subcommand, from a system console, even if JES isn't up. The reason TSSO works this way, is that it uses the established TSO load module libraries, such as SYS1.CMDLIB and SYS1.LINKLIB and SYS1.LPALIB, even though the TSO address space isn't there. TSSO establishes its OWN TSO-like environment, in its OWN address space. And remember that you can START TSSO under SUB=MSTR. TSSO uses the existing TSO modules that are in the system, but the TSO-like environment that TSSO creates, is ITS OWN, not TSO's. So TSSO is not dependent on TSO running. But TSSO can execute the TSO commands from the TSO libraries, and you have full line-mode TSO power with TSSO. This allows you to run all the line-mode PDS 8.6 commands from a system console, if you've included the PDS 8.6 load module in the STEPLIB libraries of the TSSO startup PROC. And you can run powerful TSO commands such as CDSCB (CBT File 300) if you had the foresight to include them in the TSSO STEPLIB library, and made that library APF authorized. So I'll leave it up to your imagination and ingenuity, how far you choose to go with this. If you install TSSO on your systems, and make it as powerful as you need to, then you'll have a fine low-level recovery tool available when not much of your MVS system will come up. You can even use the TSO EDIT line-mode command under TSSO, if you know how to use EDIT and are somewhat skilled with it. I've even used the TSO HELP command under TSSO to display HELP information on the console. You just type something like ?PDS86 'SYS1.HELP' (field mark) LIST LISTD, and you can restrict the outputs later, the way you need them, to get the help you need. TSO COMES UP, BUT YOU CAN'T GET TO ISPF Two free tools come to mind, which will run under raw TSO, but which will allow you to edit files and do many recovery operations in a versatile way, approximating much of the power of ISPF. One of these tools is RPF (CBT Tape Files 415 (non-XA) or 417 (XA and higher) from Rob Prins. And the other tool is REVIEW from Greg Price (CBT Files 134 (source) and 135 (load modules)). If you have both of these tools already installed on your MVS systems, then you won't have to resort to more primitive means, if (God forbid) an appropriate recovery situation would present itself. Figure 2, which is the main menu for RPF/E (the XA version), gives you a pretty good idea about what the tool can do, using only raw TSO. I don't have the space to go into details here, but I must say that if you have a modern MVS system which is at least in XA mode, then please install RPF/E (from File 417) rather than RPF (from File 415) because you will be able to edit much larger files. RPF/E puts the data above the 16 meg line. Nevertheless, author Rob Prins has taken great pains to keep both tools at an equal level of functionality and maintenance. REVIEW from Greg Price (the original author of REVIEW was Bill Godfrey) initially was a file browsing tool only. But Greg Price has added a file editing capability to REVIEW in recent releases, so that MVS 3.8 running under the Hercules emulator (ISPF isn't available there) would have a file editing facility. (In fact, that's why we have RPF too. Rob Prins wanted to give his RPF file editor to the Hercules people so they could have a file editor that ran under raw TSO.) REVIEW's new file editing capability is invoked using its subcommand UPDATE, invoked from its command line when you're looking at a dataset. And if you're running REVEIW with a PDS directory, you type U next to the member that you want to edit. REVIEW's editor (separate load module REVEDIT, or CSECT REVEDIT) is remarkably ISPF-like, but Greg hasn't yet gotten around to adding ALL of the ISPF bells and whistles. Nevertheless, REVIEW is a VERY good editor. RPF is a very good editor too, but I think that REVIEW, being newer, and also containing a lot more file browsing power, can edit much more troublesome and larger files than RPF can. So between RPF and REVIEW (if they are installed on your systems) you have a lot of recovery power when ISPF can't come up for some reason. SUMMARY Today we've looked into free MVS system recovery tools at three levels. The first is when you can't bring MVS up at all. Then you need a standalone recovery tool such as ZZSA from Jan Jaeger (CBT Tape Files 437 and 538). This should get the system to where you can IPL and get some stuff to come up, at least to the point where LOADxx and PARMLIB have been read, and the MVS fields which are pointed to by the CVT have mostly or completely been filled out. Then a tool which runs SUB=MSTR, such as TSSO, can help us out to go further. Finally, if TSO is up, but you can't get to ISPF, the (much) more sophisticated file editors that are connected to RPF or REVIEW, can be used to fix the system to where it can finally come up completely. I wish all of you the best of everything, and hope that you can join me here again, next time. * * * * * * * * * * * * * * * * * * * * * * * Figure 1. Primary Menu for Jan Jaeger's ZZSA Stand-Alone Utility Information about ZZSA (which is a free tool) may be found on CBT Tape Files 437 and 538. You can load a DASD pack with IPL Text for ZZSA, and IPL it, pointing to your existing MVS DASD configuration. And then you can fix all your packs, without an IPL of MVS! ZZSAPRIM Stand Alone Utilities Option ===> 0 ListDev - List all devices 1 Browse - Browse dataset or member Console 0700/3278 2 Edit - Edit dataset or member IPL Device 0A97/3390 3 ListVTOC - List Volume Table Of Contents IPL CPU 0000 4 ListPDS - List PDS directory CPU Version FD 5 DispVol - Display DASD volume label CPU Serial 000192 6 Dump - Dump DASD record by CCHHR CPU Model 1247 7 Zap - Alter DASD record by CCHHR Date (TOD) 07/11/2006 X Exit - Terminate program Time (TOD) 13:34:33 Jan Jaeger - Version 12/07/98-12.15 * * * * * * * * * * * * * * * * * * * * * * * Figure 2. Main menu for Rob Prins' XA version of RPF, called RPF/E RPF (non-XA) is found on CBT File 415. This version, called RPF/E (for XA, ESA, and higher) is found on CBT File 417. ---------------------------- RPF/E MAIN MENU --------------------Invalid option Option ===> USERID - SBGOLOB 0 Defaults - Alter / Display session defaults Time - 10:49:11 1 View - Display source data or output listings System - SYS1 2 Edit - Update / Create a member or dataset TSO-proc- ISPFPROC 3 Utility - Enter UTILITY Release - V1R2M2 4 Assembler - Foreground ASSEMBLER and LINK 5 User - Execute RPF/E user routine 6 TSO - Execute TSO commands November 2006 7 Tutorial - Display HELP information Su Mo Tu We Th Fr Sa 8 Test - Enter TEST mode (Authorized) 1 2 3 4 9 Operator - Enter OPERATOR mode 5 6 7 8 9 10 11 X Exit - Terminate RPF/E 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Hit PF03/15 to terminate RPF/E 26 27 28 29 30