MVS TOOLS AND TRICKS OF THE TRADE MARCH 2003 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. A REPLACEMENT FOR MCNVTCAT Those of us who are veteran MVS systems programmers remember a wonderful little tool that IBM's CBIPO packaging department had developed. It was a program called MCNVTCAT, and it helped set up your system catalog and usercatalogs when you were installing a new MVS version. The way the MCNVTCAT program worked was that it took a "LISTCAT ALL" listing of your catalog, and generated "DEFINE NONVSAM" statements so you could recatalog all of your old non-VSAM catalog entries into a new system catalog or into new usercatalogs. Indeed, the MCNVTCAT program was a handy tool, and those of us who used it in the past, remember it very fondly. However, for all intents and purposes, MCNVTCAT has disappeared from the face of the earth. (Unless, of course, you've saved yourself a copy from the old days--a practice which I recommend highly.) The reason for this (I think) is as follows: The MCNVTCAT tool was originally developed as an unsupported add-on by the MVS software packaging folks. Customers (i.e. users) found it to be handy, and started asking for enhancements. Since the people who developed that software were not the usual IBM software developers, but their division is designated as a function to package what others have written, and since MCNVTCAT is connected to CBIPO and is not distributed via SMP/E as part of an MVS release, two things happened. First, the MCNVTCAT writer(s) were not obligated to make any enhancements, since that program was like some field-developed tool. And second, when the CBIPO packaging was replaced by ServerPac and other offerings, MCNVTCAT disappeared with it. Today, you can't get a copy of the MCNVTCAT program from IBM. IBM won't put it on one of their web sites, since it isn't supported, and if they made it available, people would demand that they fix it (since it isn't perfect). And as for replacing MCNVTCAT's functionality, IBM has basically told the world that it's a tough situation--"sorry 'bout that". In addition, I can't put MCNVTCAT source code into the CBT Tape collection, because it is owned by IBM, and I can only put freely distributable stuff there. So the bottom line is that today, MCNVTCAT is unavailable. RCNVTCAT TO THE RESCUE About a year and a half ago, there was a big stir on the IBM-Main newsgroup about how to replace MCNVTCAT's functionality. After much discussion, the outcome was that Alastair Gray, an English sysprog who works in Switzerland, wrote a replacement program (in REXX) that does the same thing as MCNVTCAT, only better. This REXX is called RCNVTCAT, and it is much easier to use than MCNVTCAT ever was. Since RCNVTCAT is a public program, it can be enhanced. RCNVTCAT may be obtained on File 542 of the CBT Tape collection at www.cbttape.org . Unlike MCNVTCAT, which requires complicated JCL to run, you just run RCNVTCAT as a TSO command, and point it to a catalog name. RCNVTCAT will run the LISTCAT 'catalog.name' ALL command in the foreground, and will execute its logic against the result, producing IDCAMS DEFINE commands for each of several categories, for recataloging the objects from each class in a new catalog. Currently, RCNVTCAT allocates its work datasets as UNIX objects, but Alastair Gray is currently working on a version to use standard MVS work datasets, if UNIX services are not available. The result of RCNVTCAT execution is a partitioned dataset whose members each contain DEFINE statements in a different category, just like MCNVTCAT produced. Please look at Figure 1, to see an example of pds members produced by a sample execution of RCNVTCAT. A summary report for all the actions RCNVTCAT has taken, is illustrated in Figure 5. This report is obviously modeled after the old MCNVTCAT summary report, with its reference to OS CVOLS. But every entry in the summary report that is marked with an (M), describes the contents of a corresponding member of the RCNVTCAT output pds. And you can see the result of RCNVTCAT's actions. Detailed DEFINE statements for recataloging non-VSAM, VSAM cluster, and usercatalog entries, can be seen in Figures 2, 3, and 4 respectively. There is also a separate member for recataloging datasets beginning with SYS1, which is similar to the NONVSAM member. All of this will make your life much easier, when trying to create a new system catalog or user catalog. WHAT RCNVTCAT ACTUALLY DOES FOR YOU At this point, I want to show a bit more detail about how handy a program like RCNVTCAT is. When you are building a new system, you want to retain all the old entries in your system catalog, which refer to your installation's usercatalogs, GDG's, important datasets, and so forth. But some extra datasets may have gotten cataloged in your old system catalog by mistake. So you want to keep all the relevant catalog entries, but you want to clean up all the garbage. RCNVTCAT will generate DEFINE statements or error statements for all of the entries in your old catalog, and you can browse or edit these at your leisure. Therefore, when you create your new system catalog from scratch, you can edit out the "garbage" catalog entries from the DEFINE statements, and only run the DEFINEs for the desired entries. Thus, you can create a new system catalog or usercatalog, with just the entries you want, and without the entries you don't want. It is very hard to achieve a result like this, without a program like RCNVTCAT. True, you can run a LISTCAT ALL against the catalog and go through it by hand, marking all the "garbage" entries that you don't want. Then you can REPRO all the entries from the old catalog into the new catalog, and delete the irrelevant ones. But that way is not as clean as creating a brand new catalog and only recataloging the entries you want to keep. All the space in the catalog is efficiently used, and no subsequent reorganization is necessary. Having the source DEFINE statements for all (or most of) the entries in your catalog, makes for a better recovery situation too. So now you see what all the fuss was about on the IBM-Main ` newsgroup, when people were looking for the old MCNVTCAT program. Today, we have also seen that it is better to have a public program which performs a function like this, rather than an unsupportable IBM program. If some functionality in the program doesn't exist, a user can put it in for everone else to use. And if there are errors, a user can fix them for everyone, without the problem that is involved, in trying to get IBM to fix something they don't want to. I'm sure that by now, you all have seen the wisdom of trying to replace IBM field-written tools by user-written tools. Thank goodness that we still have enough skilled Assembler programmers and REXX programmers among us, to support such tools. And one programmer who does a good job, will be able to make a reliable fix for everyone to use, when some tool does need to be supported. Best of luck to all of you, and I hope to see you again next month. * * * * * * * * * * * * * * * * * * * * * * * Figure 1. Member list listing of the partitioned dataset which was produced by the RCNVTCAT exec, run against the system master catalog. I have added ISPF statistics, using the free PDS 8.5 program package from CBT Tape File 182. The members may be copied to a permanent pds for future reference. ------------------------- MEMLIST Source Member List 1 ------- Row 1 to 9 of 9 COMMAND ===> SCROLL ===> CSR nter an ISPF command, a PDS subcommand or a special control code: 8 View log 1 Suspend ISPF 6 MEMLIST all F Find R Recall LA Lista 4 Sublist = 7 Output table L Locate SO Sort LV Listv 5 Check aliases 9 Swap panels O Options X Above/Below/All - DSN=SYS03033.T100041.RA000.SBGOLOB.R0100014,VOL=SER=DATA01 MEM=: ---------- CMD NAME DATA VER.MOD CREATED LAST MODIFIED SIZE INIT ID ALIAS 01.00 03/02/02 03/02/02 1:51 211 211 OS390MC GDG 01.00 03/02/02 03/02/02 1:51 2 2 OS390MC IMPORT 01.00 03/02/02 03/02/02 1:51 238 238 OS390MC MISC 01.00 03/02/02 03/02/02 1:51 27 27 OS390MC NONVSAM 01.00 03/02/02 03/02/02 1:51 197 197 OS390MC RECAT 01.00 03/02/02 03/02/02 1:51 123 123 OS390MC REPORT 01.00 03/02/02 03/02/02 1:51 33 33 OS390MC SYSCTLG 01.00 03/02/02 03/02/02 1:51 2 2 OS390MC SYS1 01.00 03/02/02 03/02/02 1:51 1593 1593 OS390MC * * * * * * * * * * * * * * * * * * * * * * * Figure 2. Part of the NONVSAM member, with DEFINE statements produced by the RCNVTCAT REXX, to recatalog non-VSAM entries in the OS390 Master Catalog. DEF NVSAM(NAME(AJV.AAJVSMP1 ) - DEVT( 3390 ) - VOL( OS3DAA ) )- CAT(CATALOG.OS390.MASTER ) DEF NVSAM(NAME(AJV.AAJVS390 ) - DEVT( 3390 ) - VOL( OS3DAA ) )- CAT(CATALOG.OS390.MASTER ) DEF NVSAM(NAME(AJV.SAJVSMP1 ) - DEVT( 3390 ) - VOL( OS39RA ) )- CAT(CATALOG.OS390.MASTER ) ... and so forth ... * * * * * * * * * * * * * * * * * * * * * * * Figure 3. Beginning of the RECAT member of the partitioned dataset produced by the RCNVTCAT exec. This gives DEFINE statements to recatalog VSAM structures. This output is an improvement over the functionality of the old MCNVTCAT program, which did not produce statements to recatalog VSAM structures. /* CLUSTER ------- 0000000000000000000000000000000000 CANNOT RECAT */ /* CLUSTER ------- IXGLOGR.ATR.ADCDPL.ARCHIVE.A000000 CANNOT RECAT */ /* CLUSTER ------- IXGLOGR.ATR.ADCDPL.DELAYED.UR.A000 CANNOT RECAT */ /* CLUSTER ------- IXGLOGR.ATR.ADCDPL.MAIN.UR.A000000 CANNOT RECAT */ /* CLUSTER ------- IXGLOGR.ATR.ADCDPL.RESTART.A000000 CANNOT RECAT */ /* CLUSTER ------- IXGLOGR.ATR.ADCDPL.RM.DATA.A000000 CANNOT RECAT */ DEF CLUSTER(NAME(SYS1.ACDS ) - VOL( OS39M1 ) - LINEAR - RECATALOG ) - DATA(NAME(SYS1.ACDS.DATA ) ) - CAT(CATALOG.OS390.MASTER ) ... and so forth ... * * * * * * * * * * * * * * * * * * * * * * * Figure 4. DEFINE statements produced by the RCNVTCAT exec, to recatalog the usercatalog entries and their associated aliases, in the master catalog. IMPORT OBJ( (CBTUSER.USERCAT - DEVT(270F2000) VOL(DATA02))) CONNECT - CAT(CATALOG.OS390.MASTER ) DEF ALIAS(REL(CBTUSER.USERCAT ) - NAME(CBT )) - CAT(CATALOG.OS390.MASTER ) IMPORT OBJ( (COVUSER.USERCAT - DEVT(270F2000) VOL(DATA02))) CONNECT - CAT(CATALOG.OS390.MASTER ) DEF ALIAS(REL(COVUSER.USERCAT ) - NAME(COV )) - CAT(CATALOG.OS390.MASTER ) ... and so forth ... * * * * * * * * * * * * * * * * * * * * * * * Figure 5. The RCNVTCAT Summary Report This is an illustration of the RCNVTCAT summary report, folded into 72 columns for easy reading. From here, you can see a description of the type of data in each member created. This report is obviously modeled after the MCNVTCAT summary report. OS CVOL CATALOG NAMES TO BE CONVERTED *RCNVTCAT* C O N V E R S I O N R E P O R T ALIAS TOTAL .......(M)... 70 TOTAL NUMBER OF ALIAS STMTS IN CATALOG ALIAS SYSCTLG ........... 0 ALIAS STMTS ASSOCIATED WITH OS CVOL CATALOGS ALIAS VSAM UCAT ......... 0 ALIAS STMTS ASSOCIATED WITH VSAM USER CATALOGS ALIAS NONVSAM DS ........ 0 ALIAS STMTS ASSOCIATED WITH NON VSAM DATA SETS IMPORT VSAM UCATS ..(M)... 9 NUMBER OF VSAM USER CATALOGS NONVSAM DS TOTAL .......... 447 TOTAL NUMBER OF NON VSAM DATA SETS IN CATALOG NON VSAM VOLUMES ......... 447 VOLUMES ASSOCIATED WITH NON VSAM DATA SETS. SEE NOTE 1 OS CVOL SYSCTLG ....(M)... 0 OS CVOL CATALOGS WITH THE FOLLOWING NAMES: SYSCTLG.VXXXXXX - XXXXXX = VOLUME SYSCTLG CONVERTED ........ 0 OS CVOL CATALOG NAMES CONVERTED TO SYSCTLG.VXXXXXX . SEE NOTE 2 AND SYSPRINT OUTPUT LISTING NONVSAM SYS1. DS....(M)... 398 NON VSAM DATA SETS STARTING WITH SYS1.--- NONVSAM OTHER DS....(M)... 49 ALL OTHER NON VSAM DATA SETS GDG TOTAL .......(M)... 0 NUMBER OF GENERATION DATA GROUP STMTS MISC TOTAL .......(M)... 26 NUMBER OF STATEMENTS WHICH COULD N O T BE PROCESSED ------------------------------------ INVALID DEVICE TYPE ....... 0 NUMBER OF STATEMENTS WHICH CONTAIN AN INVALID DEVICE TYPE. SEE NOTE 3 NO. OF STMTS PROC ......... 622 TOTAL NUMBER OF STATEMENTS WHICH WERE PROCESSED SUM OF A/I/N/G/M .......... 552 SUM OF STATEMENTS WHICH WERE PROCESSED FOR ALIAS/IMPORT/NONVSAM/GDG AND MISC. SEE NOTE 4 (M) : A MEMBER WAS CREATED IN DATA SET CONVERT.ENTRIES NOTE 1 : SOME DATA SETS NEED OF MORE THAN ONE VOLUME NOTE 2 : DATA SETS WHICH START WITH SYSCTLG WILL BE CONVERTED TO SYSCTLG.VXXXXXX, XXXXXX = VOLUME NOTE 3 : DEVICE TYPE IS NOT RECOGNISED BY RCNVTCAT !!. BETTER CHECK THE CODE !?! NOTE 4 : DIFFERENCE SHOULD BE THE NUMBER OF ALIAS TOTAL. THEY ARE PROCESSED TWICE