MVS TOOLS AND TRICKS OF THE TRADE SEPTEMBER 1999 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. PC's, C, and ASSEMBLER One thing that strikes me about this profession is how much time and effort we have to spend, learning about new things. When I started in this business, a so-called "intelligent terminal" was just about unknown. Everybody used "dumb terminals". Nowadays, it is extremely uncommon for any MVS systems programmer to use a "real 3278" or its equivalent. Practically all of us use pc's which emulate a color terminal that has graphics. Most pc's that are being used by MVS sysprogs today, are running some form of Windows, usually of the 9x or NT variety. An MVS person absolutely has to know, at minimum skill level, how to navigate in Windows. Administering Windows is another matter. If you work at a big company, you generally leave that to the "PC Department" or the "Network Administrators". If you run your own shop, like me, you have to learn about the Registry, how to back up essential system files, and many other related things, so as to be able to recover from system errors, burps, glitches, and having unwanted instances of the system modifying itself. When I installed Windows 98 second edition, I spent $130 on books: "Windows 98 Resource Kit" and "Running Windows 98" from Microsoft, and "Windows 98 Registry for Dummies", which is an oxymoron if I ever heard one. You've got to be pretty smart to read that book, but it's worth every penny! I have one more observation which reflects the nature of these times. Somebody sent me a request, via email of course, that he wanted a CBT Tape in tape form. He explained that he was a consultant at a site which didn't have any way of loading a pc file up to the MVS mainframe. Of course, you all know that the CBT MVS Tape materials are on the Internet now (just go to www.naspa.net and click on "Online CBT Tape"). However when you download the files, unless your mainframe has a direct TCP/IP connection, you get the files on a pc and have to upload them to MVS. I wondered if his was still a common predicament, so I put a notice out on the IBM-MAIN news forum, and asked if anyone else had the same problem as this fellow. I got nary an affirmative reply, and a bunch of snickers and laughs from "the folks out there". Times surely have changed. The MVS sysprog world is definitely "wired to the pc and the Internet" nowadays. All of this stuff is seemingly unrelated to our actual business of MVS Systems Programming. After all, it's our "official business" to set up the mainframe, so it works. People who work with pc's at home, or for a living, might have to know such things, not us! But the world is marching on, and it's different now. Today I'm going to talk about some interesting new products that relate to MVS Systems Programming directly, and which run on a pc, or they're related to the pc world. These products are there, to help us adjust to the new way of doing our business. Once we see what these products are all about, we can be very glad that there's a bridge between the old "way of the world" and the new one. Just to read about the existence of such products, will enlarge our comfort zone with the way this world is now becoming. In this column, I usually write about free tools that everyone can obtain and use. This month, I'm making an exception, because I feel that we should know about some different concepts that will expand our horizons and our ways of looking at things. In our day and age, that's a direction in which we're being forced to grow. PC programs usually aren't free, although their prices are normally far below the astronomical cost of most mainframe products. I still think you'll get a lot of use out of this information. The Tachyon Assembler, Operating System, and File Tools David Bond is a very skilled programmer, and a nice person also. David has written a super product, which I could not believe, until I tried it myself. Imagine writing an MVS assembler program using SPF/PC or some other file editor, on your pc. Then you assemble it on the pc, create data files to try it out, and test it using an interactive debugger that displays registers, an authentic PSW, and all kinds of program data, as it runs. You debug the program, reassemble it on the pc, upload the object decks to the mainframe, linkedit them, and run a clean, debugged program, the first time it runs under MVS. Is this Science Fiction? It definitely is not. I did it myself. We are talking about the Tachyon Cross Assembler and the Tachyon Operating System (TOS). I'll talk about the new Tachyon File Tools later. These packages are super equipment for the modern sysprog and Assembler software developer. David Bond has written these tools using standard ANSI C, and so they are portable across many platforms. Imagine running an IBM- compatible assembler and debugger on a UNIX machine or a pc! This Tachyon Cross Assembler is almost completely compatible with the High Level Assembler, Version 3. Tachyon Details. The Tachyon suite of products currently has three separate parts, which are licensed separately: the Tachyon Cross Assembler, the Tachyon Operating System (TOS), and the Tachyon File Tools. The Tachyon Assembler (called X390) takes ASCII source code input, translates it into EBCDIC in a standard way, and assembles it to produce an MVS-compatible object deck (FB-80), which of course is EBCDIC also. This object deck can be uploaded to the MVS machine, and linkedited as is. A listing is produced by the Tachyon Assembler, which looks very much like a comparable listing using IBM's High Level Assembler. Just about all of the assembler error handling you're accustomed to with the High Level Assembler, can also be found on the Tachyon Assembler as well. Although X390 does take ASCII source, convert it to EBCDIC and assemble, there are times when you need to be able to give it EBCDIC source (say, for a REPRO card). X390 "automagically" recognizes the input is already in EBCDIC and properly handles this situation. So, you can give X390 EBCDIC or ASCII source, and it will "do the right thing." The Tachyon Cross Assembler has a convenient GUI interface to Windows (9x or NT), which is called TIDE (Tachyon Integrated Development Environment). Under Windows, you get into TIDE, pull up a source program into a window, assemble it interactively, and look at all the error messages, if there are any. You click on a given error message, and the assembler source is positioned to the appropriate line of code, so you can correct the error. The file which will contain the assembler listing can be determined by settings in the X390.INI file, which is where defaults for the assembler are set. Defaults can also be changed very conveniently, from within the TIDE GUI interface. This facility is like SYSTERM, except that you have another window for correcting the assembler source that's in error. Under the Tachyon Cross Assembler, a listing is produced that is just as informative as the IBM High Level Assembler's listing. In fact, the two listings are very compatible with each other. Under Windows, you can get into SPF/PC in another window, and browse the assembly listing, at the same time you're still looking at the assembler source and errors in TIDE. Windows does make MVS assembler programming more convenient than it was on the mainframe under TSO. Also, response time on the pc is much quicker. When you've finished assembling, you have an object deck, which you can upload to the mainframe for linkage editing. That's as far as it goes if you have the Tachyon Cross Assembler only, which, by the way, is covered by the same license no matter how many computers the single user has. For example, if a programmer has the Tachyon Assembler licensed for the desktop at work, it could also be used on a laptop while traveling, so you can do assembly work on a train or in a hotel. And the license also covers the home computer, so the programmer can be much more flexible and productive at all times. The Tachyon Operating System is a separately licensed product that works together with the Tachyon Cross Assembler. Since the MVS linkage editor needs to put its load modules into a partitioned dataset, and there aren't any pds'es on a pc, David Bond had to write a special binder of his own, to create program objects that will run under his Tachyon operating system on the pc. This binder program, which is the Tachyon equivalent of the MVS Linkage Editor, is called B390. B390 issues its own messages, not unlike those issued by the OS/390 binder. Once the program object is created, you have to run it. The Tachyon Operating System has some remarkable JCL-like capability in running programs. Using the Tachyon program J390, you execute JCL, which can either point to ASCII files or EBCDIC files. And once all the file locations have been set up and the JCL executes, MVS-like run time messages are produced, and the output gets "spooled" (as a file on a subdirectory) so you can look at it to see how everything ran. The run-time information looks like an MVS batch job, and it is remarkably detailed, even including instruction and I/O counts. Before leaving our discussion of the Tachyon Software product offerings, I'd like to say that the Tachyon File Tools, a useful collection of utilities that will definitely grow in the future, help complete the convenience of moving an MVS environment over to one or more pc's. Tachyon offers a super-useful un-XMIT utility, and an IEBUPDTE utility: TUX and TUU respectively. I've used TUX extensively. If you have an MVS macro library, and you put it into TSO XMIT format using the OUTDSN keyword, you can download the entire maclib to a pc, and run TUX against it. Almost instantly, the entire library is dumped into a subdirectory and converted to ASCII member by member. The macros are instantly available for use by the Tachyon Assembler. What happens when a load module library is put into XMIT format, downloaded to the pc, and given the TUX treatment, is even more remarkable. The load modules are delinked, csect by csect, into object decks, suitable for re-binding by the Tachyon binder, so they can be executed under the Tachyon Operating System. You can even use TUX as a mainframe delinker, uploading the resulting object decks, unchanged, back to the mainframe. These programs stand on their own merit, even independently of the Tachyon Assembler and other Tachyon Software products. David Bond tells me that TUX has been used by companies, in ways completely unrelated to the Assembler. One company has customers who have trouble downloading things, such as dumps. That company tells their customers to put this data into TSO XMIT format and send it to them via email or ftp. Then, at the support site, the support people use TUX on the pc to look at the data. If you want to find out more about the Tachyon Cross Assembler, TOS, and the Tachyon File Tools, contact http://www.tachyonsoft.com/tachyon. The Amazing Dignus Systems/C Compiler Dave Rivers has been a compiler writer practically all of his working life. What he has produced, in my opinion, is second to none. We systems programmers all know about IBM's PL/S, PL/AS, and PL/X compilers, that IBM developed for their internal use only. How do they work? Operating system code developers code a system-level program in a PL/I-like language that's quick, and their code compiles to assembler source code. The developer can even mix "raw assembler" code with the PL/I-like stuff, if assembler language will do the job better. IBM has used this system for its own development for many years now. Dave Rivers has come up with something even better than that. Dave has written a C-language compiler which compiles to assembler language source code, and which allows the programmer to mix in "raw assembler" code, whenever he feels it'll do the job better. This is very similar to PL/X, except that it's C, not PL/I. And it's "pure C", not "PL/I-like". For this obvious reason, Dave calls his product Systems/C. There's something very modern (and with the times) in this. Most people coming out of Computer Science school nowadays learn to program in C-language, which is a cross-platform standard, and which is very pervasive in the industry nowadays. If you're writing system-level code, with the Dignus Systems/C compiler, you have a sort-of "instant PL/X" and a whole crop of trained programmers who are equipped to use it. This is not only helpful to software developers, but it is an extremely useful product for normal MVS applications and system groups who want to convert their coding to C. Besides the C source itself, you also get assembler source, which is far more finely customizable. This product has tremendous win-win potential. At Dave Rivers' web site: http://www.dignus.com , you can actually put in a C-language program (up to 200 lines) and watch how the Dignus Systems/C compiler converts it to assembly language. And you can see the compile listing and everything, online. Dave has also contributed a couple of files to the CBT MVS Utilities Tape (go to www.naspa.net and click on "Online CBT Tape"). File 419 consists of C-source, the equivalent assembler source, and user documentation for several popular C programs, so they can be run on MVS. File 420 is a load library which contains the executables for these same programs. I'd like to add that Dignus System/C can be made to dovetail very nicely with the Tachyon Assembler and Operating System. If you have C-language source code, you can compile it into assembler source using Systems/C, and then assemble the assembler source on a pc, using the Tachyon Assembler. You can then run the object code wherever you want--either uploaded to the mainframe and linkedited, or under TOS on the pc. As I said before, it's a new world today. The flexibility is amazing. As a final note, and to say something about MVS freebie tools, I'm happy to announce that Version 421 of the CBT MVS Tapes will be available soon. This new version of the CBT Tape alone, has approximately 45 additional and updated files. It's a big change from even the last version. There's a lot of interesting stuff out there for everybody. Good luck. We hope to see you again next month.