MUMPS ("Massachusetts General Hospital Utility Multi-Programming System"), or M, is an imperative, high-level
programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming ...
with an integrated transaction processing
key–value database
A key–value database, or key–value store, is a data storage paradigm designed for storing, retrieving, and managing associative arrays, and a data structure more commonly known today as a ''dictionary'' or ''hash table''. Dictionaries conta ...
. It was originally developed at
Massachusetts General Hospital for managing hospital laboratory information systems.
MUMPS technology has since expanded as the predominant database for health information systems and
electronic health records in the United States. MUMPS-based information systems run over 40% of the hospitals in the U.S., run across all of the U.S. federal hospitals and clinics, and provide health information services for over 54% of patients across the U.S.
A unique feature of the MUMPS technology is its integrated
database language, allowing direct, high-speed read-write access to permanent disk storage. This provides tight integration of unlimited applications within a single database, and provides extremely high performance and reliability as an
online transaction processing In online transaction processing (OLTP), information systems typically facilitate and manage transaction-oriented applications. This is contrasted with online analytical processing.
The term "transaction" can have two different meanings, both of w ...
system.
History
1960s-70s - Genesis
MUMPS was developed by
Neil Pappalardo, Robert Greenes, and Curt Marble in Dr. Octo Barnett's lab at the
Massachusetts General Hospital (MGH) in
Boston
Boston (), officially the City of Boston, is the state capital and most populous city of the Commonwealth of Massachusetts, as well as the cultural and financial center of the New England region of the United States. It is the 24th- mo ...
during 1966 and 1967
. It grew out of frustration, during a National Institutes of Health (NIH)-support hospital information systems project at the MGH, with the development in assembly language on a time-shared PDP-1 by primary contractor Bolt Beranek & Newman, Inc. (BBN). MUMPS came out of an internal "skunkworks" project at MGH by Pappalardo, Marble, and Greenes to create an alternative development environment. As a result of initial demonstration of capabilities, Dr. Barnett's proposal to NIH in 1967 for renewal of the hospital computer project grant took the bold step of proposing that the system be built in MUMPS going forward, rather than relying on the BBN approach. The project was funded, and serious implementation of the system in MUMPS began.
The original MUMPS system was, like
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
a few years later, built on a
DEC PDP-7
The PDP-7 was a minicomputer produced by Digital Equipment Corporation as part of the PDP series. Introduced in 1964, shipped since 1965, it was the first to use their Flip-Chip technology. With a cost of , it was cheap but powerful by the s ...
. Octo Barnett and Neil Pappalardo obtained a
backward compatible
Backward compatibility (sometimes known as backwards compatibility) is a property of an operating system, product, or technology that allows for interoperability with an older legacy system, or with input designed for such a system, especially in ...
PDP-9
The PDP-9, the fourth of the five 18-bit minicomputers produced by Digital Equipment Corporation, was introduced in 1966. A total of 445 PDP-9 systems were produced, of which 40 were the compact, low-cost PDP-9/L units..
History
The 18-bit PDP ...
, and began using MUMPS in the admissions cycle and laboratory test reporting. MUMPS was then an
interpreted language
In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interprete ...
, yet even then, incorporated a
hierarchical database
A hierarchical database model is a data model in which the data are organized into a tree-like structure. The data are stored as records which are connected to one another through links. A record is a collection of fields, with each field containin ...
file system to standardize interaction with the data and abstract disk operations so they were only done by the MUMPS language itself. MUMPS was also used in its earliest days in an experimental clinical progress note entry system
and a radiology report entry system
.
Some aspects of MUMPS can be traced from
RAND Corporation's
JOSS Joss may refer to:
* Joss (name), including a list of people with the name
* JOSS, a time-sharing programming language
* Joss (Chinese statue), a religious object
* Joss JP1, an Australian-built supercar
* Joss paper, a type of burnt offering
* ...
through
BBN's
TELCOMP
TELCOMP was a programming language developed at Bolt, Beranek and Newman (BBN) in about 1964 and in use until at least 1974. BBN offered TELCOMP as a paid service, with first revenue in October 1965. The service was sold to On-Line Systems, Inc. ...
and
STRINGCOMP. The MUMPS team chose to include portability between machines as a design goal.
An advanced feature of the MUMPS language not widely supported in
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
s or in
computer hardware of the era was
multitasking. Although timesharing on
mainframe computers was increasingly common in systems such as
Multics
Multics ("Multiplexed Information and Computing Service") is an influential early time-sharing operating system based on the concept of a single-level memory.Dennis M. Ritchie, "The Evolution of the Unix Time-sharing System", Communications of ...
, most mini-computers did not run parallel programs and threading was not available at all. Even on Mainframes, the variant of batch processing where a program was run to completion was the most common implementation for an operating system of multi-programming.
It was a few years until Unix was developed. The lack of memory management hardware also meant that all multi-processing was fraught with the possibility that a memory pointer could change some other process. MUMPS programs do not have a standard way to refer to memory directly at all, in contrast to
C language
C (''pronounced like the letter c'') is a general-purpose computer programming language. It was created in the 1970s by Dennis Ritchie, and remains very widely used and influential. By design, C's features cleanly reflect the capabilities o ...
, so since the multitasking was enforced by the language, not by any program written in the language it was impossible to have the risk that existed for other systems.
Dan Brevik's DEC MUMPS-15 system was adapted to a DEC
PDP-15
The PDP-15 was the fifth and last of the 18-bit minicomputers produced by Digital Equipment Corporation. The PDP-1 was first delivered in December 1959 and the first PDP-15 was delivered in February 1970. More than 400 of these successors to t ...
, where it lived for some time. It was first installed at Health Data Management Systems of Denver in May 1971. The portability proved to be useful and MUMPS was awarded a government research grant, and so MUMPS was released to the public domain which was a requirement for grants. MUMPS was soon ported to a number of other systems including the popular DEC
PDP-8
The PDP-8 is a 12-bit minicomputer that was produced by Digital Equipment Corporation (DEC). It was the first commercially successful minicomputer, with over 50,000 units being sold over the model's lifetime. Its basic design follows the pioneer ...
, the
Data General Nova
The Data General Nova is a series of 16-bit minicomputers released by the American company Data General. The Nova family was very popular in the 1970s and ultimately sold tens of thousands of units.
The first model, known simply as "Nova", was ...
and on DEC
PDP-11 and the
Artronix PC12 minicomputer
PC12 by Artronix was a minicomputer built with 7400-series TTL technology and ferrite core memory. Computers were manufactured at the Artronix facility in suburban St. Louis, Missouri.
The instruction set architecture was adapted from the LINC ...
. Word about MUMPS spread mostly through the medical community, and was in widespread use, often being locally modified for their own needs.
Versions of the MUMPS system were rewritten by technical leaders Dennis "Dan" Brevik and Paul Stylos of
DEC in 1970 and 1971. By the early 1970s, there were many and varied implementations of MUMPS on a range of hardware platforms. Another noteworthy platform was Paul Stylos' DEC MUMPS-11 on the PDP-11, and
MEDITECH's
MIIS. In the Fall of 1972, many MUMPS users attended a conference in Boston which standardized the then-fractured language, and created the MUMPS Users Group and MUMPS Development Committee (MDC) to do so. These efforts proved successful; a standard was complete by 1974, and was approved, on September 15, 1977, as
ANSI
The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organi ...
standard, X11.1-1977. At about the same time DEC launched DSM-11 (Digital Standard MUMPS) for the PDP-11. This quickly dominated the market, and became the reference implementation of the time. Also,
InterSystems
InterSystems Corporation is a privately held vendor of software systems and technology for high-performance database management, rapid application development, integration, and healthcare information systems. The vendor's products includInter ...
sold ISM-11 for the PDP-11 (which was identical to DSM-11).
1980s
During the early 1980s several vendors brought MUMPS-based platforms that met the ANSI standard to market. The most significant were:
* Digital Equipment Corporation with DSM (Digital Standard MUMPS). DSM-11 was superseded by VAX-11 DSM for the
VMS operating system, and that was ported to the
Alpha in two variants: DSM for OpenVMS, and as DSM for Ultrix.
*
InterSystems
InterSystems Corporation is a privately held vendor of software systems and technology for high-performance database management, rapid application development, integration, and healthcare information systems. The vendor's products includInter ...
with ISM (InterSystems M) on VMS (M/VX), ISM-11 later M/11+ on the PDP-11 platform, M/PC on MS-DOS, M/DG on
Data General
Data General Corporation was one of the first minicomputer firms of the late 1960s. Three of the four founders were former employees of Digital Equipment Corporation (DEC).
Their first product, 1969's Data General Nova, was a 16-bit minicompute ...
, M/VM on IBM VM/CMS, and M/UX on various Unixes.
* Greystone Technology Corporation with a compiled version called
GT.M
GT.M is a high-throughput key–value database engine optimized for transaction processing. (It is a type also referred to as "schema-less", "schema-free", or " NoSQL".) GT.M is also an application development platform and a compiler for the ISO ...
.
* DataTree Inc. with an Intel PC-based product called DTM.
* Micronetics Design Corporation with a product line called MSM for UNIX and Intel PC platforms (later ported to IBM's VM
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common services for computer programs.
Time-sharing operating systems schedule tasks for efficient use of the system and may also i ...
, VAX/VMS platforms and OpenVMS Alpha platforms).
* Computer Consultants (later renamed MGlobal), a
Houston
Houston (; ) is the most populous city in Texas, the most populous city in the Southern United States, the fourth-most populous city in the United States, and the sixth-most populous city in North America, with a population of 2,304,580 i ...
-based company originally created CCSM on 6800, then 6809, and eventually a port to the 68000, which later became MacMUMPS, a
Mac OS
Two major famlies of Mac operating systems were developed by Apple Inc.
In 1984, Apple debuted the operating system that is now known as the "Classic" Mac OS with its release of the original Macintosh System Software. The system, rebranded "M ...
-based product. They also worked on the MGM MUMPS implementation. MGlobal also ported their implementation to the DOS platform. MGlobal MUMPS was the first commercial MUMPS for the IBM PC and the only implementation for the classic Mac OS.
*
Tandem Computers
Tandem Computers, Inc. was the dominant manufacturer of fault-tolerant computer systems for ATM networks, banks, stock exchanges, telephone switching centers, and other similar commercial transaction processing applications requiring maximum up ...
developed an implementation for their fault-tolerant computers.
*
IBM briefly sold a MUMPS implementation named MUMPS/VM which ran as a
virtual machine
In computing, a virtual machine (VM) is the virtualization/ emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized h ...
on top of
VM/370
VM (often: VM/CMS) is a family of IBM virtual machine operating systems used on IBM mainframes System/370, System/390, zSeries, System z and compatible systems, including the Hercules (emulator), Hercules emulator for personal computers.
The ...
.
This period also saw considerable MDC activity. The second revision of the ANSI standard for MUMPS (X11.1-1984) was approved on November 15, 1984.
1990s
* On November 11, 1990, the third revision of the ANSI standard (X11.1-1990) was approved.
* In 1992 the same standard was also adopted as
ISO
ISO is the most common abbreviation for the International Organization for Standardization.
ISO or Iso may also refer to: Business and finance
* Iso (supermarket), a chain of Danish supermarkets incorporated into the SuperBest chain in 2007
* Iso ...
standard 11756-1992. Use of M as an alternative name for the language was approved around the same time.
* On December 8, 1995, the fourth revision of the standard (
X11.1-1995) was approved by ANSI, and by
ISO
ISO is the most common abbreviation for the International Organization for Standardization.
ISO or Iso may also refer to: Business and finance
* Iso (supermarket), a chain of Danish supermarkets incorporated into the SuperBest chain in 2007
* Iso ...
in 1999 a
ISO 11756:1999 which was als
published by ANSI The MDC finalized a further revision to the standard in 1998 but this has not been presented to ANSI for approval.
* InterSystems' Open M for
Windows NT
Windows NT is a proprietary graphical operating system produced by Microsoft, the first version of which was released on July 27, 1993. It is a processor-independent, multiprocessing and multi-user operating system.
The first version of Win ...
was released, as well as Open M for
Digital Unix
Tru64 UNIX is a discontinued 64-bit UNIX operating system for the Alpha instruction set architecture (ISA), currently owned by Hewlett-Packard (HP). Previously, Tru64 UNIX was a product of Compaq, and before that, Digital Equipment Corporation ...
and
OpenVMS (their first 64-bit implementations, for the 64-bit Alpha processor).
* In 1997 Unicode support was added in InterSystems' Caché 3.0
2000s
* By 2000, the
middleware
Middleware is a type of computer software that provides services to software applications beyond those available from the operating system. It can be described as "software glue".
Middleware makes it easier for software developers to implement c ...
vendor InterSystems had become the dominant player in the MUMPS market with the purchase of several other vendors. Initially they acquired DataTree Inc. in the early 1990s. And, on December 30, 1995, InterSystems acquired the DSM product line from DEC. InterSystems consolidated these products into a single product line, branding them, on several hardware platforms, as OpenM. In 1997, InterSystems launched a new product named
Caché. This was based on their ISM product, but with influences from the other implementations. Micronetics Design Corporation assets were also acquired by InterSystems on June 21, 1998. InterSystems remains the dominant MUMPS vendor, selling Caché to MUMPS developers who write applications for a variety of operating systems.
* Greystone Technology Corporation's GT.M implementation was sold to Sanchez Computer Associates (now part of
FIS
FIS or fis may refer to:
Science and technology
* '' Fis'', an ''E. Coli'' gene
* Fis phenomenon, a phenomenon in linguistics
* F♯ (musical note)
* Flight information service, an air traffic control service
* Frame Information Structure, a Se ...
) in the mid-1990s. On November 7, 2000, Sanchez made GT.M for Linux available under the
GPL
The GNU General Public License (GNU GPL or simply GPL) is a series of widely used free software licenses that guarantee end users the four freedoms to run, study, share, and modify the software. The license was the first copyleft for general u ...
license and on October 28, 2005, GT.M for
OpenVMS and
Tru64 UNIX were also made available under the AGPL license. GT.M continues to be available on other
UNIX
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, an ...
platforms under a traditional license.
* During 2000, Ray Newman and others released MUMPS V1, an implementation of MUMPS (initially on FreeBSD) similar to DSM-11. MUMPS V1 has since been ported to
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, w ...
,
Mac OS X
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
, and
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ser ...
(using cygwin). Initially only for the x86 CPU, MUMPS V1 has now been ported to the Raspberry Pi.
* The newest implementation of MUMPS, released in April 2002, is an MSM derivative called M21 from the Real Software Company of Rugby,
UK.
* There are also several open source implementations of MUMPS, including some research projects. The most notable of these i
Mumps/II by Dr. Kevin O'Kane (Professor Emeritus,
University of Northern Iowa
The University of Northern Iowa (UNI) is a public university in Cedar Falls, Iowa. UNI offers more than 90 majors across the colleges of Business Administration, Education, Humanities, Arts, and Sciences, Social and Behavioral Sciences and gr ...
) and students' project. Dr. O'Kane has also ported the interpreter to Mac OS X.
* One of the original creators of the MUMPS language, Neil Pappalardo, founded a company called
MEDITECH. They extended and built on the MUMPS language, naming the new language MIIS (and later, another language named MAGIC). Unlike InterSystems, MEDITECH no longer sells middleware, so MIIS and MAGIC are now only used internally at MEDITECH.
* On 6 January 2005, and later again on 25 June 2010, ISO re-affirmed its MUMPS-related standards
ISO/IEC 11756:1999, language standardan
Name
The chief executive of InterSystems disliked the name MUMPS and felt that it represented a serious marketing obstacle. Thus, favoring M to some extent became identified as alignment with InterSystems. The dispute also reflected rivalry between organizations (the M Technology Association, the MUMPS Development Committee, the ANSI and ISO Standards Committees) as to who determines the "official" name of the language.
A leading authority, and the author of an open source MUMPS implementation, Professor Kevin O'Kane, uses only 'MUMPS'.
The most recent standard (ISO/IEC 11756:1999, re-affirmed on 25 June 2010), still mentions both M and MUMPS as officially accepted names.
Massachusetts General Hospital registered "MUMPS" as a trademark with the USPTO on November 28, 1971, and renewed it on November 16, 1992, but let it expire on August 30, 2003.
Design
Overview
MUMPS is a language intended for and designed to build database applications. Secondary language features were included to help programmers make applications using minimal computing resources. The original implementations were
interpreted, though modern implementations may be fully or partially
compiled
In computing, a compiler is a computer program that translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primarily used for programs that ...
. Individual "programs" run in memory
"partitions". Early MUMPS memory partitions were limited to 2048 bytes so aggressive abbreviation greatly aided multi-programming on severely resource limited hardware, because more than one MUMPS job could fit into the very small memories extant in hardware at the time. The ability to provide multi-user systems was another language design feature. The word "Multi-Programming" in the acronym points to this. Even the earliest machines running MUMPS supported multiple jobs running at the same time. With the change from mini-computers to micro-computers a few years later, even a "single user PC" with a single 8-bit CPU and 16K or 64K of memory could support multiple users, who could connect to it from (non-
graphical
Graphics () are visual images or designs on some surface, such as a wall, canvas, screen, paper, or stone, to inform, illustrate, or entertain. In contemporary usage, it includes a pictorial representation of data, as in design and manufacture ...
)
video display terminals.
Since memory was tight originally, the language design for MUMPS valued very terse code. Thus, every MUMPS command or function name could be abbreviated from one to three letters in length, e.g. (exit program) as , = function, = command, = function. Spaces and end-of-line markers are significant in MUMPS because line scope promoted the same terse language design. Thus, a single line of program code could express, with few characters, an idea for which other programming languages could require 5 to 10 times as many characters. Abbreviation was a common feature of languages designed in this period (e.g.,
FOCAL-69, early BASICs such as
Tiny BASIC
Tiny BASIC is a family of Programming language#Dialects, flavors and implementations, dialects of the BASIC programming language that can fit into 4 or fewer kilobyte, KBs of random-access memory, memory. Tiny BASIC was designed in response to th ...
, etc.). An unfortunate side effect of this, coupled with the early need to write minimalist code, was that MUMPS programmers routinely did not comment code and used extensive abbreviations. This meant that even an expert MUMPS programmer could not just skim through a page of code to see its function but would have to analyze it line by line.
Database interaction is transparently built into the language. The MUMPS language provides a
hierarchical database
A hierarchical database model is a data model in which the data are organized into a tree-like structure. The data are stored as records which are connected to one another through links. A record is a collection of fields, with each field containin ...
made up of
persistent sparse array
Sparse is a computer software tool designed to find possible coding faults in the Linux kernel. Unlike other such tools, this static analysis tool was initially designed to only flag constructs that were likely to be of interest to kernel deve ...
s, which is implicitly "opened" for every MUMPS application. All variable names prefixed with the caret character () use permanent (instead of RAM) storage, will maintain their values after the application exits, and will be visible to (and modifiable by) other running applications. Variables using this shared and permanent storage are called ''Globals'' in MUMPS, because the scoping of these variables is "globally available" to all jobs on the system. The more recent and more common use of the name "global variables" in other languages is a more limited scoping of names, coming from the fact that
unscoped variables are "globally" available to any programs running in the same process, but not shared among multiple processes. The MUMPS Storage mode (i.e. globals stored as persistent sparse arrays), gives the MUMPS database the characteristics of a
document-oriented database
A document-oriented database, or document store, is a computer program and data storage system designed for storing, retrieving and managing document-oriented information, also known as semi-structured data.
Document-oriented databases are one ...
.
All variable names which are not prefixed with caret character () are temporary and private. Like global variables, they also have a hierarchical storage model, but are only "locally available" to a single job, thus they are called "locals". Both "globals" and "locals" can have child nodes (called ''subscripts'' in MUMPS terminology). Subscripts are not limited to numerals—any
ASCII
ASCII ( ), abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices. Because ...
character or group of characters can be a subscript identifier. While this is not uncommon for modern languages such as Perl or JavaScript, it was a highly unusual feature in the late 1970s. This capability was not universally implemented in MUMPS systems before the 1984 ANSI standard, as only canonically numeric subscripts were required by the standard to be allowed. Thus, the variable named 'Car' can have subscripts "Door", "Steering Wheel", and "Engine", each of which can contain a value and have subscripts of their own. The variable could have a nested variable subscript of "Color" for example. Thus, you could say
SET ^Car("Door","Color")="BLUE"
to modify a nested child node of . In MUMPS terms, "Color" is the 2nd subscript of the variable (both the names of the child-nodes and the child-nodes themselves are likewise called subscripts). Hierarchical variables are similar to objects with properties in many
object-oriented
Object-oriented programming (OOP) is a programming paradigm based on the concept of " objects", which can contain data and code. The data is in the form of fields (often known as attributes or ''properties''), and the code is in the form of p ...
languages. Additionally, the MUMPS language design requires that all subscripts of variables are automatically kept in sorted order. Numeric subscripts (including floating-point numbers) are stored from lowest to highest. All non-numeric subscripts are stored in alphabetical order following the numbers. In MUMPS terminology, this is ''canonical order''. By using only non-negative integer subscripts, the MUMPS programmer can emulate the
arrays
An array is a systematic arrangement of similar objects, usually in rows and columns.
Things called an array include:
{{TOC right
Music
* In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
data type from other languages. Although MUMPS does not natively offer a full set of
DBMS
In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases s ...
features such as mandatory schemas, several DBMS systems have been built on top of it that provide application developers with flat-file, relational, and
network database features.
Additionally, there are built-in operators which treat a delimited string (e.g.,
comma-separated values
A comma-separated values (CSV) file is a delimited text file that uses a comma to separate values. Each line of the file is a data record. Each record consists of one or more fields, separated by commas. The use of the comma as a field separat ...
) as an array. Early MUMPS programmers would often store a structure of related information as a delimited string, parsing it after it was read in; this saved disk access time and offered considerable speed advantages on some hardware.
MUMPS has no data types. Numbers can be treated as strings of digits, or strings can be treated as numbers by numeric operators (''coerced'', in MUMPS terminology). Coercion can have some odd side effects, however. For example, when a string is coerced, the parser turns as much of the string (starting from the left) into a number as it can, then discards the rest. Thus the statement
IF 20<"30 DUCKS"
is evaluated as
TRUE
in MUMPS.
Other features of the language are intended to help MUMPS applications interact with each other in a multi-user environment. Database locks, process identifiers, and
atomicity of database update transactions are all required of standard MUMPS implementations.
In contrast to languages in the C or
Wirth traditions, some space characters between MUMPS statements are significant. A single space separates a command from its argument, and a space, or newline, separates each argument from the next MUMPS token. Commands which take no arguments (e.g.,
ELSE
) require two following spaces. The concept is that one space separates the command from the (nonexistent) argument, the next separates the "argument" from the next command. Newlines are also significant; an
IF
,
ELSE
or
FOR
command processes (or skips) everything else till the end-of-line. To make those statements control multiple lines, you must use the
DO
command to create a code block.
Hello, World! example
A simple
"Hello, World!" program
A "Hello, World!" program is generally a computer program that ignores any input and outputs or displays a message similar to "Hello, World!". A small piece of code in most general-purpose programming languages, this program is used to illustr ...
in MUMPS might be:
write "Hello, World!",!
and would be run with the command
do ^hello
after it has been saved to disk. For direct execution of the code a kind of "label" (any alphnummeric string) on the first position of the programm line is needed to tell the mumps interpreter where to start execution. Since MUMPS allows commands to be strung together on the same line, and since commands can be abbreviated to a single letter, this routine could be made more compact:
w "Hello, World!",!
The '
,!
' after the text generates a newline. This code would return to the prompt.
Features
ANSI X11.1-1995 gives a complete, formal description of the language; an annotated version of this standard is available online.
Language features include:
; Data types : There is one universal
data type, which is implicitly
coerced
Coercion () is compelling a party to act in an involuntary manner by the use of threats, including threats to use force against a party. It involves a set of forceful actions which violate the free will of an individual in order to induce a desi ...
to string, integer, or floating-point data types as context requires.
; Booleans : In IF commands and other syntax that has expressions evaluated as conditions, any string value is evaluated as a numeric value and, if that is a nonzero value, then it is interpreted as True.
a yields 1 if a is less than b, 0 otherwise.
; Declarations : None. All variables are dynamically created at the first time a value is assigned.
; Lines : are important syntactic entities, unlike their status in languages patterned on C or Pascal. Multiple statements per line are allowed and are common. The scope of any , , and command is "the remainder of current line."
; Case sensitivity : Commands and intrinsic functions are case-insensitive. In contrast, variable names and labels are case-sensitive. There is no special meaning for upper vs. lower-case and few widely followed conventions. The percent sign (%) is legal as first character of variables and labels.
; Postconditionals : execution of almost any command can be controlled by following it with a colon and a truthvalue expression. SET:N<10 A="FOO"
sets A to "FOO" if N is less than 10; DO:N>100 PRINTERR,
performs PRINTERR if N is greater than 100. This construct provides a conditional whose scope is less than a full line.
; Abbreviation : You can abbreviate nearly all commands and native functions to one, two, or three characters.
; Reserved words : None. Since MUMPS interprets source code by context, there is no need for reserved words. You may use the names of language commands as variables, so the following is perfectly legal MUMPS code:
:
GREPTHIS()
NEW SET,NEW,THEN,IF,KILL,QUIT SET IF="KILL",SET="11",KILL="l1",QUIT="RETURN",THEN="KILL"
IF IF=THEN DO THEN
QUIT:$QUIT QUIT QUIT ; (quit)
THEN IF IF,SET&KILL SET SET=SET+KILL QUIT
:MUMPS can be made more obfuscated by using the contracted operator syntax, as shown in this terse example derived from the example above:
:
GREPTHIS()
N S,N,T,I,K,Q S I="K",S="11",K="l1",Q="R",T="K"
I I=T D T
Q:$Q Q Q
T I I,S&K S S=S+K Q
; Arrays : are created dynamically, stored as B-tree
In computer science, a B-tree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time. The B-tree generalizes the binary search tree, allowing for ...
s, are sparse (i.e. use almost no space for missing nodes), can use any number of subscripts, and subscripts can be strings or numeric (including floating point). Arrays are always automatically stored in sorted order, so there is never any occasion to sort, pack, reorder, or otherwise reorganize the database. Built-in functions such as , , (deprecated), and functions provide efficient examination and traversal of the fundamental array structure, on disk or in memory.
:
for i=10000:1:12345 set sqtable(i)=i*i
set address("Smith","Daniel")="dpbsmith@world.std.com"
; Local arrays : variable names not beginning with caret (i.e. "^") are stored in memory by process, are private to the creating process, and expire when the creating process terminates. The available storage depends on implementation. For those implementations using partitions, it is limited to the partition size (a small partition might be 32K). For other implementations, it may be several megabytes.
; Global arrays : ^abc, ^def
. These are stored on disk, are available to all processes, and are persistent when the creating process terminates. Very large globals (for example, hundreds of gigabytes) are practical and efficient in most implementations. This is MUMPS' main "database" mechanism. It is used instead of calling on the operating system to create, write, and read files.
; Indirection : in many contexts, @VBL
can be used, and effectively substitutes the contents of VBL into another MUMPS statement. SET XYZ="ABC" SET @XYZ=123
sets the variable ABC to 123. SET SUBROU="REPORT" DO @SUBROU
performs the subroutine named REPORT. This substitution allows for lazy evaluation
In programming language theory, lazy evaluation, or call-by-need, is an evaluation strategy which delays the evaluation of an expression until its value is needed ( non-strict evaluation) and which also avoids repeated evaluations (sharing).
The ...
and late binding as well as effectively the operational equivalent of "pointers" in other languages.
; Piece function : This breaks variables into segmented pieces guided by a user specified separator string (sometimes called a "delimiter"). Those who know awk
AWK (''awk'') is a domain-specific language designed for text processing and typically used as a data extraction and reporting tool. Like sed and grep, it is a filter, and is a standard feature of most Unix-like operating systems.
The AWK lang ...
will find this familiar. $PIECE(STRINGVAR,"^",3)
means the "third caret-separated piece of ." The piece function can also appear as an assignment (SET command) target.
:$PIECE("world.std.com",".",2)
yields .
:After
:
SET X="dpbsmith@world.std.com"
:SET $P(X,"@",1)="office"
causes X to become "office@world.std.com" (note that is equivalent to and could be written as such).
; Order function : This function treats its input as a structure, and finds the next index that exists which has the same structure except for the last subscript. It returns the sorted value that is ordered after the one given as input. (This treats the array reference as a content-addressable data rather than an address of a value.)
:
Set stuff(6)="xyz",stuff(10)=26,stuff(15)=""
:$Order(stuff(""))
yields , $Order(stuff(6))
yields , $Order(stuff(8))
yields , $Order(stuff(10))
yields , $Order(stuff(15))
yields .
:
Set i="" For Set i=$O(stuff(i)) Quit:i="" Write !,i,10,stuff(i)
:Here, the argument-less repeats until stopped by a terminating . This line prints a table of and where is successively 6, 10, and 15.
:For iterating the database, the Order function returns the next key to use.
:
GTM>S n=""
GTM>S n=$order(^nodex(n))
GTM>zwr n
n=" building"
GTM>S n=$order(^nodex(n))
GTM>zwr n
n=" name:gd"
GTM>S n=$order(^nodex(n))
GTM>zwr n
n="%kml:guid"
MUMPS supports multiple simultaneous users and processes even when the underlying operating system does not (e.g., MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
). Additionally, there is the ability to specify an environment for a variable, such as by specifying a machine name in a variable (as in SET ^, "DENVER", A(1000)="Foo"
), which can allow you to access data on remote machines.
Criticism
Some aspects of MUMPS syntax differ strongly from that of more modern languages, which can cause confusion, although those aspects vary between different versions of the language. On some versions, whitespace is not allowed within expressions, as it ends a statement: 2 + 3
is an error, and must be written 2+3
. All operators have the same precedence and are left-associative
In programming language theory, the associativity of an operator is a property that determines how operators of the same precedence are grouped in the absence of parentheses. If an operand is both preceded and followed by operators (for exampl ...
(2+3*10
evaluates to 50). The operators for "less than or equal to" and "greater than or equal to" are '>
and '<
(that is, the boolean negation operator '
plus a strict comparison operator in the opposite direction), although some versions allow the use of the more standard <=
and >=
respectively. Periods (.
) are used to indent the lines in a DO block, not whitespace. The ELSE command does not need a corresponding IF, as it operates by inspecting the value in the built-in system variable $test
.
MUMPS scoping rules are more permissive than other modern languages. Declared local variables are scoped using the stack. A routine can normally see all declared locals of the routines below it on the call stack, and routines cannot prevent routines they call from modifying their declared locals, unless the caller manually creates a new stack level (do
) and aliases each of the variables they wish to protect (. new x,y
) before calling any child routines. By contrast, undeclared variables (variables created by using them, rather than declaration) are in scope for all routines running in the same process, and remain in scope until the program exits.
Because MUMPS database references differ from internal variable references only in the caret prefix, it is dangerously easy to unintentionally edit the database, or even to delete a database "table".
Users
The US Department of Veterans Affairs (formerly the Veterans Administration) was one of the earliest major adopters of the MUMPS language. Their development work (and subsequent contributions to the free MUMPS application codebase) was an influence on many medical users worldwide. In 1995, the Veterans Affairs' patient Admission/Tracking/Discharge system, Decentralized Hospital Computer Program
Vista usually refers to a distant view.
Vista may also refer to:
Software
*Windows Vista, the line of Microsoft Windows client operating systems released in 2006 and 2007
*VistA, (Veterans Health Information Systems and Technology Architecture) ...
(DHCP) was the recipient of the Computerworld Smithsonian Award for best use of Information Technology in Medicine. In July 2006, the Department of Veterans Affairs (VA) / Veterans Health Administration
The Veterans Health Administration (VHA) is the component of the United States Department of Veterans Affairs (VA) led by the Under Secretary of Veterans Affairs for Health that implements the healthcare program of the VA through a nationa ...
(VHA) was the recipient of the Innovations in American Government Award presented by the Ash Institute of the John F. Kennedy School of Government
The Harvard Kennedy School (HKS), officially the John F. Kennedy School of Government, is the school of public policy and government of Harvard University in Cambridge, Massachusetts. The school offers master's degrees in public policy, public ...
at Harvard University
Harvard University is a private Ivy League research university in Cambridge, Massachusetts. Founded in 1636 as Harvard College and named for its first benefactor, the Puritan clergyman John Harvard, it is the oldest institution of high ...
for its extension of DHCP into the Veterans Health Information Systems and Technology Architecture (VistA
Vista usually refers to a distant view.
Vista may also refer to:
Software
*Windows Vista, the line of Microsoft Windows client operating systems released in 2006 and 2007
* VistA, (Veterans Health Information Systems and Technology Architecture) ...
). Nearly the entire VA hospital system in the United States, the Indian Health Service
The Indian Health Service (IHS) is an operating division (OPDIV) within the U.S. Department of Health and Human Services (HHS). IHS is responsible for providing direct medical and public health services to members of federally-recognized Nativ ...
, and major parts of the Department of Defense Department of Defence or Department of Defense may refer to:
Current departments of defence
* Department of Defence (Australia)
* Department of National Defence (Canada)
* Department of Defence (Ireland)
* Department of National Defense (Philipp ...
CHCS hospital system use MUMPS databases for clinical data tracking.
Other healthcare IT companies using MUMPS include:
* Epic
* MEDITECH
* GE Healthcare
GE HealthCare is a subsidiary of American multinational conglomerate General Electric incorporated in New York and headquartered in Chicago, Illinois. As of 2017, it is a manufacturer and distributor of diagnostic imaging agents and radiopharma ...
(formerly IDX Systems
IDX Systems Corporation (IDX) was a healthcare software technology company that formerly had headquarters in South Burlington, Vermont, United States. It was founded in 1969 by Robert Hoehl, Richard Tarrant, and Paul Egerman. IDX was acquired ...
and Centricity)
* AmeriPath (part of Quest Diagnostics)
* Care Centric
* Allscripts
Allscripts Healthcare Solutions, Inc. is a publicly traded American company that provides physician practices, hospitals, and other healthcare providers with practice management and electronic health record technology. Allscripts also provides ...
* Coventry Health Care
* EMIS Health
* Sunquest Information Systems (formerly Misys Healthcare).
* Netsmart
Many reference laboratories, such as DASA, Quest Diagnostics
Quest Diagnostics is an American clinical laboratory. A Fortune 500 company, Quest operates in the United States, Puerto Rico, Mexico, and Brazil. Quest also maintains collaborative agreements with various hospitals and clinics across the globe ...
, and Dynacare, use MUMPS software written by or based on Antrim Corporation code. Antrim was purchased by Misys Healthcare (now Sunquest Information Systems) in 2001.
MUMPS is also widely used in financial applications. MUMPS gained an early following in the financial sector and is in use at many banks and credit unions. It is used by TD Ameritrade
TD Ameritrade is a stockbroker that offers an electronic trading platform for the trade of financial assets including common stocks, preferred stocks, futures contracts, exchange-traded funds, forex, options, mutual funds, fixed income investmen ...
as well as by the Bank of England and Barclays Bank
Barclays () is a British multinational universal bank, headquartered in London, England. Barclays operates as two divisions, Barclays UK and Barclays International, supported by a service company, Barclays Execution Services.
Barclays traces ...
.
Implementations
Since 2005, the most popular implementations of MUMPS have been Greystone Technology MUMPS (GT.M) from Fidelity National Information Services, and Caché, from Intersystems Corporation. The European Space Agency announced on May 13, 2010, that it will use the InterSystems Caché
InterSystems Caché ( ) is a commercial operational database management system from InterSystems, used to develop software applications for healthcare management, banking and financial services, government, and other sectors. Customer software c ...
database to support the ''Gaia'' mission. This mission aims to map the Milky Way
The Milky Way is the galaxy that includes our Solar System, with the name describing the galaxy's appearance from Earth: a hazy band of light seen in the night sky formed from stars that cannot be individually distinguished by the naked eye. ...
with unprecedented precision. InterSystems is in the process of phasing out Caché in favor of Iris.
Other current implementations include:
* M21
* YottaDB
* MiniM
* Reference Standard M
* FreeM
See also
* Profile Scripting Language
Profile Scripting Language (PSL) is a superset of the MUMPS programming language that adds object-oriented language features. It is currently developed by Fidelity National Information Services (hereafter FIS).
History
PSL is a language that ...
* Caché ObjectScript
Caché ObjectScript is a part of the Caché database system sold by InterSystems. The language is a functional superset of the ANSI-standard MUMPS programming language. Since Caché is at its core a MUMPS implementation, it can run ANSI MUMPS ...
* GT.M
GT.M is a high-throughput key–value database engine optimized for transaction processing. (It is a type also referred to as "schema-less", "schema-free", or " NoSQL".) GT.M is also an application development platform and a compiler for the ISO ...
* InterSystems Caché
InterSystems Caché ( ) is a commercial operational database management system from InterSystems, used to develop software applications for healthcare management, banking and financial services, government, and other sectors. Customer software c ...
Further reading
*
*
* Lewkowicz, John. ''The Complete MUMPS: An Introduction and Reference Manual for the MUMPS Programming Language.''
* Kirsten, Wolfgang, et al. (2003) ''Object-Oriented Application Development Using the Caché Postrelational Database''
*
* O'Kane, K.C.; ''A language for implementing information retrieval software,'' Online Review, Vol 16, No 3, pp 127–137 (1992).
* O'Kane, K.C.; and McColligan, E. E., ''A case study of a Mumps intranet patient record,'' Journal of the Healthcare Information and Management Systems Society, Vol 11, No 3, pp 81–95 (1997).
* O'Kane, K.C.; and McColligan, E.E., ''A Web Based Mumps Virtual Machine,'' Proceedings of the American Medical Informatics Association 1997
* O'Kane, K.C., The Mumps Programming Language, Createspace, , 120 pages (2010).
External links
*
*
Mumps Programming Language Interpreter (GPL)
by Kevin O'Kane, University of Northern Iowa
*
Development and Operation of a MUMPS Laboratory Information System: A Decade's Experience at Johns Hopkins Hospital
IDEA Systems' technology solutions based on YottaDB (formerly FIS GT.M) and Caché
MUMPS documentation, topics, and resources (mixed Czech and English)
{{authority control
MUMPS programming language
Data processing
Data-centric programming languages
Digital Equipment Corporation
Dynamically typed programming languages
Health informatics
IEC standards
ISO standards
Massachusetts General Hospital
PDP-11
Persistent programming languages
Programming languages with an ISO standard
Scripting languages
Programming languages created in 1966