Mumps Programming Language

The Mumps Programming Language

Kevin C. O'Kane
Professor Emeritus
Computer Science Department
University of Northern Iowa
Cedar Falls, IA 50613

Last Update: August 21, 2020
  • The Mumps Programming Language (Amazon versions)
  • Mumps Language Users' Guide (PDF)
  • Mumps Language Quick Introduction & Tutorial (PDF)

  • Note: Due to changes in the gcc compiler, it is necessary to turn OFF optimization during compilation. Otherwise, there will be errors in the database. (To turn off optimization, you needed to remove all instances of -O3 from and re-build). Optimization is turned off in the distribution file.

    Version 20

    Version 20 changes the database. The database options are now:

    1. Native single user database
    2. Native shared (multi-user) database
    3. Sqlite3 database.
    The new version is compatible with Ubuntu 20.04 under Windows 10 WSL 2 (Windows Subsystem for Linux).

    The last version with PostgreSql and MySql remains available but is unsupported. If you need a copy, send email.

    Latest Version:

  • Mumps Interpreter open source code distribution: mumps-20.06.src.tar.gz

  • Mumps Programming Language Tutorial & Examples
  • High-res copy of an hierarchical medical record diagram
  • EER Relational Database Version of the Hierarchical Model

  • The MDH (Multi-Dimensional and Hierarchical) Toolkit is a collection of C++ classes and code to emulate many Mumps features in C++.

  • Multi-Dimensional & Hierarchical Toolkit Users' Guide (PDF)

  • The Mumps Language

    Beginning in 1966, the Mumps programming language (also referred to as M), was developed by Neil Pappalardo and others in Dr. Octo Barnett's lab at the Massachusetts General Hospital on a PDP-7. It was later ported to a number of machines including the PDP-11 and VAX.

    Mumps is a general purpose programming language that supports a novel, native, hierarchical database facility. The acronym stands for the Massachusetts General Hospital Utility Multi-programming System. It is widely used in financial and clinical applications and remains to this day the basis of the U.S. Veterans Administration's computerized medical record system VistA (Veterans Health Information Systems and Technology Architecture), the largest of its kind in the world.

    As originally conceived, Mumps differs from other mini-computer based languages by providing a:

    1. Hierarchical database facility. Mumps data sets are not only organized along traditional sequential and direct access methods, but also as trees whose data nodes can addressed as path descriptions in a manner which is easy for a novice programmer to master in a relatively short time;
    2. Flexible and powerful string manipulation facilities. Mumps built-in string manipulation operators and functions provide programmers with access to efficient means to accomplish complex string manipulation and pattern matching operations.

    Syntactically, Mumps is based on an earlier language named JOSS and has an appearance similar to early versions of BASIC which was also based on JOSS. Another feature of Mumps which distinguished it from other language environments at the time was its ability to run multiple applications and serve multiple users concurrently on very primitive computers.

    Over the years, a number of implementations were developed. Many of these are now extinct or have evolved considerably from their original base. As the early implementations began to differ linguistically from on another, an effort to standardize Mumps began. This culminated in the 1977 ANSI standard for Mumps (X11.1-1977).

    The standards effort continued until 1995 when the last standard was published (see: American National Standard for Information Systems - Programming Languages - M ANSI/MDC X11.1-1995). Since then, the standards writing Mumps Development Committee has disbanded and there have been no new standards developed. At present, the 1995 standard has lapsed in the United States but remains in effect as ISO (ISO/IEC 11756:1999). Also, as of 1995, there were related standards either published or in development for Mumps system interconnections (X11.2), a graphical kernel definition (X11.3), X-window binding (X11.4), TCP-IP binding (X11.5) and a windowing API (X11.6). These have also lapsed in the United Sates but some are still in effect at ISO.

    GPL Mumps is distributed in source code for Linux and Cygwin (for MS Windows). It is licensed under the Gnu General Public License V2 and may be redistributed subject to the conditions of the license. The package includes a robust Mumps interpreter, a Mumps compiler (not up to date) and a Mumps-like class library for C++ (MDH).

    For the most part, GPL Mumps follows the 1995 standard but those areas where it deviates from the standard are highlighted in the documentation. In addition to supporting a builtin database, the GPL Mumps permits storage of the Mumps global arrays in relational database management systems. At present, these include MySQL and PostgreSQL. When the globals are stored in one of the RDBMS systems, they become ACID compliant and accessible by means of SQL queries.

    Also available is an document indexing, classification and retrieval sytem using the vector space model written in Mumps.

    Mumps Programming Tutorial

    1. Mumps Programming Language Tutorial Part 1

    2. Mumps Programming Language Tutorial Part 2

    3. Mumps Programming Language Tutorial Part 3

    4. Mumps Programming Language Tutorial Part 4

    5. Mumps Programming Language Tutorial Part 5

    6. Mumps Programming Language Tutorial Part 6

    7. Mumps Programming Language Tutorial Part 7

    8. Mumps Programming Language Tutorial Part 8

    9. Mumps Programming Language Tutorial Part 9

    10. Mumps Programming Language Tutorial Part 10

    11. Mumps Programming Language Tutorial Part 11

    12. Mumps Programming Language Tutorial Part 12

    13. Mumps Programming Language Tutorial Part 13

    14. Mumps Programming Language Tutorial Part 14

    15. Mumps Programming Language Tutorial Part 15

    16. Mumps Programming Language Tutorial Part 16

    17. Mumps Programming Language Tutorial Part 17

    18. Mumps programming example: word dictionary & count program

    19. Mumps programming example: word dictionary & count Part 2

    20. Mumps Document Term Matrix example

    21. Global Array Navigation

    22. Arithmetic operations in Mumps

    23. RDBMS Medical DB Model vs Mumps

    24. Building a MeSH Tree

    25. MeSH Tree Print Programs

    26. MeSH Index Program

    27. MeSH Titles Program

    28. Find MeSH Terms and Sub-Terms

    29. Installing Mumps with the Native Database

    30. Example: Simple programs to add 10 numbers in Mumps

    31. Example: Reading multiple values from a single line

    32. Example: constants

    33. Inverse Document Frequencies

    34. Weighting Terms in Documents