History
1960s-70s - Genesis
MUMPS was developed by1980s
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 the1990s
* 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 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 in 1999 a2000s
* By 2000, the middleware 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 ofName
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.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. 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) 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.,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 simpledo ^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:
,!
' 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 universala 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-trees, 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")="[email protected]"
; 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 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 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="[email protected]"
:SET $P(X,"@",1)="office"
causes X to become "[email protected]" (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). 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 (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
In computer programming, the scope of a name binding (an association of a name to an entity, such as a variable) is the part of a program where the name binding is valid; that is, where the name can be used to refer to the entity. In other parts o ...
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 (DHCP) was the recipient of the Computerworld Smithsonian Award The '' Computerworld'' Smithsonian Award is given out annually to individuals who have used technology to produce beneficial changes for society. Nominees are proposed by a group of 100 CEOs of information technology companies. The award has been g ...
for best use of Information Technology in Medicine. In July 2006, the Department of Veterans Affairs (VA) / Veterans Health Administration (VHA) was the recipient of the Innovations in American Government Award presented by the Ash Institute of the John F. Kennedy School of Government at Harvard University for its extension of DHCP into the Veterans Health Information Systems and Technology Architecture ( VistA). Nearly the entire VA hospital system in the United States, the Indian Health Service, and major parts of the Department of Defense CHCS hospital system use MUMPS databases for clinical data tracking.
Other healthcare IT companies using MUMPS include:
* Epic
Epic commonly refers to:
* Epic poetry, a long narrative poem celebrating heroic deeds and events significant to a culture or nation
* Epic film, a genre of film with heroic elements
Epic or EPIC may also refer to:
Arts, entertainment, and medi ...
* MEDITECH
* GE Healthcare (formerly IDX Systems and Centricity
Centricity is a brand of healthcare IT software systems from GE Healthcare, a division of General Electric. It includes software for independent physician practices, academic medical centers, hospitals and large integrated delivery networks. The ...
)
* AmeriPath (part of Quest Diagnostics)
* Care Centric
* Allscripts
* Coventry Health Care
Coventry Health Care, Inc. was a health insurer in the United States. It had 3.7 million medical members, 1.5 million Medicare Part D members, and 900,000 Medicaid members. In May 2013, the company was acquired by Aetna for $5.7 billion.
History
...
* EMIS Health
* Sunquest Information Systems
Sunquest Information Systems Inc. is a U.S. developer of medical laboratory and diagnostic information solutions, with a user base of hospitals and commercial laboratories.
In 1996, Sunquest acquired Antrim Corporation, a developer of turnkey l ...
(formerly Misys Healthcare).
* Netsmart
Many reference laboratories, such as DASA, Quest Diagnostics, and Dynacare, use MUMPS software written by or based on Antrim Corporation code. Antrim was purchased by Misys Healthcare (now Sunquest Information Systems
Sunquest Information Systems Inc. is a U.S. developer of medical laboratory and diagnostic information solutions, with a user base of hospitals and commercial laboratories.
In 1996, Sunquest acquired Antrim Corporation, a developer of turnkey l ...
) 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 as well as by the Bank of England
The Bank of England is the central bank of the United Kingdom and the model on which most modern central banks have been based. Established in 1694 to act as the English Government's banker, and still one of the bankers for the Government of ...
and Barclays Bank.
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é database to support the ''Gaia'' mission. This mission aims to map the Milky Way 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
* Caché ObjectScript
* GT.M
* InterSystems Caché
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