Mumps, A Solution Looking For A Problem

By Chris Richardson

(Copyright (c) 1993 Personal Systems, the monthly journal of the San Diego Computer Society; all rights reserved. Permission to reproduce this article is granted to other non-profit organizations such as computer user groups for non-commercial use as long as credit to the author and group is given and provided a copy of the newsletter is sent to us at: San Diego Computer Society, ATTN: Editor, Personal Systems; 5694 Mission Center Road; Suite 602, Box 350; San Diego, CA 92108)

What is MUMPS? Is it a programming language that thinks it is a database, or is it a database that thinks it is a programming language? Actually, it is both. And it is an ANSI Standard Language to boot.

What does that mean to anyone who is knocking out little applications on a home PC or Apple? Well, the nice thing about an ANSI Standard language is that the code you write on the Apple in standard MUMPS transports nicely to the IBM PC without any change. And if that other system is a mainframe, like a Vax or a large IBM system, your application will work there also.

Where did MUMPS come from and what does MUMPS stand for? MUMPS was originally developed in the middle 60's on a National Institute of Health Grant at Massachusetts General Hospital. It was originally designed to run on a large machine (at that time...) 4K of memory (that is 4,000 bytes, not megabytes) and 100 megabyte disk storage.

If it was written by a hospital, does it only do hospital problems? It was designed to solve the problem of tracking patient data. How does patient data differ from auto supply inventory or a check book? A patient can have many attributes that describe each encounter. For instance, suppose a patient gets admitted to a hospital with a traditional square record database, and is known to have six allergies, but there is only room for five allergies in the record.

Which allergy will you elect not to record? If this patient dies because of that one allergy that you did not record, your hospital may change ownership in settling his estate. For the majority of patients, the space reserved for the five allergies will not be used and is wasted space. That means that your hospital will be buying more disk space a lot sooner.

In the MUMPS environment, the database disk space is not allocated until it is needed (run-time). This means that the patient record expands to fit the amount of data required for that patient. If the space is not used, it is not allocated. If you have 12 patients in your database, you have only the space for these 12 records allocated.

In most traditional databases, you must allocate as many records as you expect before the first record is allocated. With MUMPS, many databases can be described but they will not take up any space until actual records are created. There is no theoretic maximum number of records that a specific database can contain. It is only bound by the actual amount of disk space that is available to be assigned. Talk about getting 10 pounds in a 5 pound sack.

Many database environments already exist for the PC, why should you be interested in another? MUMPS is unlike most other databases in that it is also a special type of programming language called an interpreter. OK, we hear the moans from the BASIC programming crowd. And did you think you got rid of interpreters when BASIC compilers came out. Well, you didn't. Interpreters don't have to be slow and most database environments actually do go interpretive when they service user queries. Anyway, even if the MUMPS interpreter was slow (which it isn't) the levels of run-time and error-time support is worth the difference.

When a MUMPS application stops for some reason, the symbol table remains intact at the line of code being executed when the error occurred. In the event of an error, control may be passed to another routine to capture the conditions of the failure or even attempt to recover from the error condition. Traditionally, MUMPS database applications have a short mean-time-to-repair (MTTR) of just a few minutes and a long up-time record. Also, in many cases, the application that blew up can be re-started from where it left off.

What does MUMPS look like? MUMPS has only a single data type, strings (of characters). This makes the conversion from one data type to another easier. Most MUMPS commands may be abbreviated to a single character. Or spell them out if you choose. Code generation is quick. MUMPS commands can be easily combined to form more complex and complicated structures. Each line of code is a block of code. MUMPS makes little distinction between data and code. Code can be created and executed from a database or the symbol table at run-time. Data can be stored in a routine and accessed at run-time. MUMPS is a sparse matrix array processor. This means that arrays are allocated at run-time; the arrays may be created in any order. Array element 1000000 can be created and then element 2 can be created and yet the array only has 2 elements in it.

Because there are only string data types, the subscripts of a MUMPS array are strings. What a concept! You can subscript an array by "APPLES" and "ORANGES", and "AVOCADOS". Now for the good news, when those subscripts are created, they are sorted alphabetically. MUMPS means never having to say you're sorting.

The language is still growing. Every ANSI Standard has a built-in sunset of seven years. That means that if nothing is done with a standard in seven years, it ceases to be a standard. Well, MUMPS has had an ANSI standard for 1977, 1984, 1990, and the MUMPS Development Committee is attempting to release a 1993 standard. Additional standards for WINDOWING, Networking, and Transaction Processing are currently in process. MUMPS is transportable. It doesn't matter if MUMPS code is running under MS-DOS, Windows NT, UNIX, VMS, VM, or nearly any operating system you might mention, the code and database will still run. In fact, in some implementations MUMPS is also the operating system.

Who uses MUMPS? Probably a lot more than you might think. How about the Veteran's Administration. Well, the VA did such a good job of putting a Fourth Generation Language together in MUMPS that the Indian Health Service decided to use it, then the U. S. Public Health Service, and finally the Department of Defense for the Army, Navy, and Air Force hospitals and clinics around the world. By the way, the VA's 4GL, File Manager is in the public domain. If you can find a source, you can get it free! Another advantage is that the package is distributed as source code because MUMPS is an interpreter.

Is it just for hospitals? No, MUMPS is an excellent choice for nearly any database operation, especially if not every aspect of the situation is known. MUMPS is being used by banks and credit unions. Do you travel on airlines? You have probably been scheduled on a MUMPS system. All of the postage stamp sales for the U.S. Postal Service are tallied on a MUMPS system each evening. Auto parts houses keep track of their inventories with MUMPS systems. Language translators have been implemented in MUMPS and it also works well with artificial intelligence projects.

If MUMPS was developed here, is it only used in this country? The national health services of Finland and England, as well as a few other countries are currently using MUMPS. Ever gamble in the gambling houses in London? They use MUMPS to track high rollers from one gambling house to the next. The British Stock Exchange also uses MUMPS. The largest department store chain in Spain uses MUMPS. The Russians acquired a copy of MUMPS and modified it to run their national health services and track containerized freight.

If MUMPS is so good, why haven't I heard of it? This is an interesting point. The computer industry lives on some very simple rules, 1) sell products with follow-on (things that need other things to work properly or better) and 2) sell items that make it difficult to migrate to another vendor's hardware or software (also known as product loyalty). MUMPS provides the programming language, the database, the screen handler, and soon, windows of any platform that will have a MUMPS interpreter (which is just about any platform). MUMPS code is extremely transportable. Standard MUMPS code works fine on whatever platform you run it on.

When a MUMPS implementation is installed to replace an existing traditional system, usually there are sufficient resources for the MUMPS environment, with plenty of resources left for future expansion.

Alright, I'm sold. Where can I get MUMPS for my system? Now for some good news, there is an evaluation version of MUMPS for MS-DOS that is free, especially if you happen to be a student. The vendor only asks that you register your use of the product.

By the way, there is extensive documentation available for this product. There is a MUMPS Users' Group (now called the M Technology Association) which can be contacted at: MUMPS Users' Group of North America 1738 Elton Road, Suite 205 Silver Spring, MD 20903 Phone: (301)-431-4070 Fax: (301)-431-0017

The free MUMPS evaluation copy is available by calling Tati Goodnough, the product manager for DataTree's DT-Student at (617)-890-2082 (She is a nice lady. Don't pass up the opportunity to talk to her.) or write her at: DataTree Inc. c/o Tati Goodnough 300 Fifth Avenue, Waltham, Massachusetts 02154

(Author Profile: Chris Richardson is a Software Engineer with Science Applications International Corporation in San Diego and is a member of the MUMPS Development Committee, the ANSI Standards writing organization for the MUMPS language. He has worked for NASA, the U. S. Public Health Service, the U. S. Navy, Army, and the Air Force as well as Computer Sciences Corporation and Singer-Link in Houston. He has taught Real-time FORTRAN and MUMPS to professionals in the industry and government).