World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0000019723
Reproduction Date:

Title: Mumps  
Author: World Heritage Encyclopedia
Language: English
Subject: List of notifiable diseases, PDP-11, Central nervous system viral disease, Vaccine, Health informatics
Publisher: World Heritage Encyclopedia


sion 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.

Large companies currently using MUMPS include AmeriPath (part of Quest Diagnostics), Care Centric, Epic, Coventry Healthcare, EMIS, Partners HealthCare (including Massachusetts General Hospital), MEDITECH, GE Healthcare (formerly IDX Systems and Centricity), and Sunquest Information Systems (formerly Misys Healthcare[8]). Many reference laboratories, such as DASA, Quest Diagnostics,[9] and Dynacare, use MUMPS software written or based on by Antrim Corporation code. Antrim was purchased by Misys Healthcare (now Sunquest Information Systems) in 2001.[10]

MUMPS is widely used in financial applications. MUMPS gained an early following in the financial sector, and MUMPS applications are in use at many banks and credit unions. It is used by Ameritrade, the largest online trading service in the US with over 12 billion transactions per day, as well as by the Bank of England and Barclays Bank, among others.[11][12][13]

Since 2005, the use of MUMPS has been either in the form of GT.M or InterSystems Caché. The latter is being aggressively marketed by InterSystems and has had success in penetrating new markets, such as telecommunications, in addition to existing markets. 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.[14]


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. The Multi-Programming in the acronym of language name point 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 with 16K or 64K of memory could support multiple users, running dumb terminals in command line mode (without any trace of a graphical user interface).

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. Quit (exit program) as Q, $P = $Piece function, R = Read command, $TR = $Translate function. Spaces and end-of-line markers are significant in MUMPS because line scope promoted the same terse language design. Hence, an entire line of program code could express the same idea a small number of characters that other programming languages might easily take 5 to 10 times as many characters to express. Abbreviation was a common feature of languages designed in this period (e.g., FOCAL-69, early BASICs such as Tiny BASIC, 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, meaning 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 made up of persistent sparse arrays, 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.[15]

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 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.[16] 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 ^Car("Door") 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 ^Car. In MUMPS terms, "Color" is the 2nd subscript of the variable ^Car (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 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 data type from other languages. Although MUMPS does not natively offer a full set of DBMS 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) 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 in MUMPS might be:

  write "Hello, World!",!


and would be run from the MUMPS command line with the command 'do ^hello'. 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:

hello() w "Hello, World!",! q

The ',!' after the text generates a newline. The 'quit' is not strictly necessary at the end of a function like this, but is good programming practice in case other functions are added below 'hello()' later.

Summary of key language features

The following summary seeks to give programmers familiar with other languages a feeling for what MUMPS is like. This is not a formal language specification, and many features and qualifiers have been omitted for brevity. ANSI X11.1-1995 gives a complete, formal description of the language; an annotated version of this standard is available online.[17]

Data types: There is one universal datatype, which is implicitly coerced to string, integer, or floating-point datatypes as context requires.

Booleans (called truthvalues in MUMPS): 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 IF, ELSE, and FOR 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 all commands 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. There has been no contest such as the International Obfuscated C Code Contest for MUMPS, despite the potential of examples such as the following, perfectly legal, MUMPS code:

       QUIT:$QUIT QUIT QUIT ; (quit)

MUMPS can be made more obfuscated by using the contracted operator syntax, as shown in this terse example derived from the example above:

       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 $DATA, $ORDER, $NEXT(deprecated) and $QUERY 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")=""

Local arrays: variable names not beginning with caret (i.e. "^") are stored in memory by process, are private to the creating process, 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 STRINGVAR." The piece function can also appear as an assignment (SET command) target.

$PIECE("",".",2) yields "std".


SET X=""

SET $P(X,"@",1)="office" causes X to become "" (note that $P is equivalent to $PIECE 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 6, $Order(stuff(6)) yields 10, $Order(stuff(8)) yields 10, $Order(stuff(10)) yields 15, $Order(stuff(15)) yields "".

Set i="" For  Set i=$O(stuff(i)) Quit:i=""  Write !,i,10,stuff(i)

Here, the argument-less For repeats until stopped by a terminating Quit. This line prints a table of i and stuff(i) where i 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

Multi-User/Multi-Tasking/Multi-Processor: 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.

For a thorough listing of the rest of the MUMPS commands, operators, functions and special variables, see these online resources:

  • MUMPS by Example, or the (out of print) book of the same name by Ed de Moel. Much of the language syntax is detailed there, with examples of usage.
  • The Annotated MUMPS Language Standard, showing the evolution of the language and differences between versions of the ANSI standard.


The Daily WTF, a site devoted to sharing programming "horror stories", includes a sharply critical article describing one programmer's experience with MUMPS's syntax and features.[18]

"MUMPS" vs. "M" naming debate

While of little interest to those outside the MUMPS/M community, this topic has been contentious there.

All of the following positions can be, and have been, supported by knowledgeable people at various times:

  • The language's name became M in 1993 when the M Technology Association adopted it.
  • The name became M on December 8, 1995 with the approval of ANSI X11.1-1995
  • Both M and MUMPS are officially accepted names.
  • M is only an "alternative name" or "nickname" for the language, and MUMPS is still the official name.

Some of the contention arose in response to strong M advocacy on the part of one commercial interest, InterSystems, whose chief executive 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. Some writers have attempted to defuse the issue by referring to the language as M[UMPS], square brackets being the customary notation for optional syntax elements. 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.

See also

  • PSL an extension to MUMPS
  • Caché ObjectScript an object oriented extension to MUMPS from a prominent MUMPS vendor
  • EsiObjects an Open Source Object Oriented extension to MUMPS
  • GT.M an implementation of M


  1. ^
  2. ^ "HP NonStop Servers, Software Product Maintenance List, Effective Date: January 2012". Hewlett-Packard Development Company, L.P. 2012-01-20. p. 32. Retrieved 2014-05-17. Description ... The date a product was classified as ACTIVE MATURE LIMITED ... MUMPS Oct-80 Dec-94 Dec-94 
  3. ^ "Google Discussiegroepen". Retrieved 2013-08-12. 
  4. ^ "Note". 2013-03-03. Retrieved 2013-08-12. 
  5. ^ "GT.M High end TP database engine - Browse Files at". Retrieved 2013-08-12. 
  6. ^ "MUMPS Database and Language - Browse Files at". Retrieved 2013-08-12. 
  7. ^ "Mumps/Mii". 2012-11-08. Retrieved 2013-08-12. 
  8. ^ "SunQuest emerges from Misys' shadow". Healthcare IT News. Retrieved 2013-08-12. 
  9. ^ "Mission-critical Ajax: Making Test Ordering Easier and Faster at Qu". Retrieved 2013-08-12. 
  10. ^ "Sunquest acquires Antrim Corp. - Free Online Library". 1996-11-26. Retrieved 2013-08-12. 
  11. ^ "Welcome to M21 -- the database for the 21st Century". Retrieved 2013-08-13. 
  12. ^ "Caché-based Financial Systems". Retrieved 203-08-13. 
  13. ^ "IDEA Turn-Key banking and ERP applications". Retrieved 2013-08-13. 
  14. ^ "European Space Agency Chooses InterSystems Caché Database For Gaia Mission to Map Milky Way". Retrieved 2013-08-13. 
  15. ^ "Extreme Database programming with MUMPS Globals". Retrieved 2013-08-13. 
  16. ^ "The Annotated M[UMPS] Standards". 2011-11-29. Retrieved 2013-08-12. 
  17. ^ The Annotated MUMPS Standards - Ed De Moel, Jacquard Systems Research
  18. ^ Papadimoulis, Alex (2007-02-13). "A Case of the MUMPS". The Daily WTF. Retrieved 2014-07-07. 

Further reading

  • Walters, Richard (1989). "ABCs of MUMPS. 1989: Butterworth-Heinemann, ISBN 1-55558-017-3.
  • Walters, Richard (1997). M Programming: A Comprehensive Guide. Digital Press. ISBN 1-55558-167-6.
  • Lewkowicz, John. The Complete MUMPS : An Introduction and Reference Manual for the MUMPS Programming Language. ISBN 0-13-162125-4
  • Kirsten, Wolfgang, et al. (2003) Object-Oriented Application Development Using the Caché Postrelational Database ISBN 3-540-00960-4
  • Martínez de Carvajal Hedrich, Ernesto (1993). "El Lenguaje MUMPS". Completa obra en castellano sobre el lenguaje Mumps. ISBN 84-477-0125-5. Distribuido exclusivamente por su author (
  • 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, ISBN 1-4382-4338-3, 120 pages (2010).

External links

  • MUMPS Information
  • M Technology and MUMPS Language FAQ (1999) General source; also specific source for the Poitras quote re the origin of the 1840 epoch.
  • Mumps Language Interpreter, Kevin O'Kane Univ Northern Iowa
  • Information Retrieval in Mumps (book and source code)
  • Mumps Language Tutorial
  • MDC - MUMPS Development Committee
  • The Annotated M{UMPS} Standards
  • Caché & MUMPS Technology Association of UK & Ireland
  • GT.M Open Source MUMPS System - Fidelity/Sanchez/Greystone
  • MUMPS Systems - Source Forge index
  • Globals: a primer for Relational Programmers
  • The M Technology Resource Center
  • M Links at
  • M21 - An ANSI M(UMPS) Implementation
  • EsiObjects An Object Oriented extension of MUMPS
  • InterSystems Caché
  • InterSystems M Technologies DSM, MSM and OpenM
  • M/DB An Open Source MUMPS-based API-compatible alternative to SimpleDB
  • MiniM Database Server, A MUMPS Implementation
  • Development and Operation of a MUMPS Laboratory Information System: A Decade's Experience at Johns Hopkins Hospital
  • IDEA Systems' technology solutions based on Caché and GT.M
  • MUMPS documentation, topics, and resources (mixed Czech and English)
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.