This version of the M[UMPS] FAQ has been copied from the most recent monthly distribution through "comp.lang.mumps". It was last updated on 1 March 1997. The only differences between this version of the FAQ and the version in the repository is that this version has been reformatted for a HTML processor. (I also ran the text through a spell-checker and applied some minor spelling replacement suggestions.)
For the most recent version, follow the hyper text link mentioned in section 25.
Last-modified: 6-Apr-1998
Version: 1.9
Posting-Frequency: monthly
This FAQ is copyright 1996-1998 by Gardner S. Trask III.
All rights reserved.
Permission is granted for this FAQ to be redistributed provided:
NOTE: This document contains URLs and addresses that were accurate at the time of the original inclusion. URLs and e-mail addresses change however, and will (when notified) be reflected in Appendix 10. So, if you wish to reach a contributor, confirm addresses there.
Editors: | Gardner Trask, | trask@world.std.com |
Jon Diamond, | Jdiamond@btinternet.com |
Ben Bishop
Jon Diamond
John D. Godfrey
Gavin Greig
Russell Haddleton
Brett Hunt
Scott P. Jones
John E. Kemker, III
Mark Komarinski
Jeff Loeb
Keith F. Lynch
Ed de Moel
Steve J. Morris
Kevin O'Gorman
Doug Preiser
Aaron Seidman
Kate Schell
Tilman Schmidt
Arthur B. Smith
Daniel P.B. Smith
Richard J. Tomlinson
Gardner Trask
David Whitten
Indirect Contributors: Those for whom postings and approved e-mail was included.
Ellis A. Bauman
Dennis J. Brevik
Etienne Cherdlu
Floyd Dennis
Rod Dorman
Lev Jacob
Monika Kratzmann
Paul Perrin
34. M as a web scripting language
Appendix 1: List of M Vendors
Appendix 2: The M Technology Association
Appendix 3: USA Local M Users Groups
Appendix 4: Is the official name of the language "M" or "MUMPS?"
Appendix 5: A "secret decoder ring:" highlights of the M language
Appendix 6: An example of "textbook" M coding style
Appendix 7: An example of "traditional" M coding style
Appendix 8: MUMPS, A Solution Looking For A Problem
Appendix 9: Testimonials, Accolades, and Articles from outside the community
Appendix 10: Contact information: e-mail and URLs
Appendix 11: FAQ Change history
In addition, with the release of MSM-Workstation in 1996, by Micronetics Design Corporation, M is now fully OLE compliant. Previously, MSM could be accessed as an OLE object via the MSM-API. Now, M can also act as an OLE controller through MSM-Workstation. The same product allows the developer to create M-based applications for MS Windows and MS Windows NT that can be distributed royalty free. M-based applications can now be distributed as shareware.
The MSM suite of products from Micronetics continues to evolve with the technology. In 1997, MSM-PDQ/Web was released, providing easy access to M-data via the Web. Later the same year, access to MSM databases via Java was made available as well.
In sum, M is no longer a character-based, closed technology. To the end-user, there is no visible distinction between an M-based application, and a non-M application. M is a powerful, dynamic aaaa technology which is now easily accessible to the most common workstation and server environments in use today.
A programming language with extensive tools for the support of database management systems. MUMPS was originally used for medical records and is now widely used where multiple users access the same databases simultaneously, e.g. banks, stock exchanges, travel agencies, hospitals.
Early MUMPS implementations for PDP-11 and IBM PC were complete operating systems, as well as programming languages, but current-day implementations usually run under a normal host operating system.
A MUMPS program hardly ever explicitly performs low-level operations such as opening a file - there are programming constructs in the language that will do so implicitly, and most MUMPS programmers are not even aware of the operating system activity that MUMPS performs.
Syntactically MUMPS has only one data-type: strings. Semantically, the language has many data-types: Text strings, binary strings, floating point values, integer values, Boolean values. Interpretation of strings is done inside functions, or implicitly while applying mathematical operators. Since many operations involve only moving data from one location to another, it is faster to just move uninterpreted strings. Of course, when a value is used multiple times in the context of arithmetical operations, optimized implementations will typically save the numerical value of the string.
MUMPS was designed for portability. Currently, it is possible to share the same MUMPS database between radically different architectures, because all values are stored as text strings. The worst an implementation may have to do is swap pairs of bytes. Such multi-CPU databases are actually in use, some offices share databases between VAX, DEC Alpha, SUN, IBM PC and HP workstations.
Versions of MUMPS are available on practically all hardware, from the
smallest (IBM PC, Apple Macintosh, Acorn Archimedes), to the largest
mainframe. MSM (Micronetics Standard MUMPS) runs on IBM PC RT and
R6000; DSM (Digital Standard Mumps) on the PDP-11, VAX, DEC Alpha,
and Windows-NT; Datatree MUMPS from InterSystems runs on IBM PC; and
MGlobal MUMPS on the Macintosh. Multi-platform versions include
M/SQL, available from InterSystems, PFCS
Greystone Technologies' GT/M runs on VAX and DEC Alpha. This is a compiler whereas the others are interpreters. GT/SQL is their SQL pre-processor.
ISO standard 11756 (1991). ANSI standard: "MUMPS Language Standard", X11.1 (1977, 1984, 1990, 1995?).
The MUMPS User's Group is known as the M Technology Association.
Mailing list: MUMPS-L@UGA.BITNET.
Usenet newsgroups: comp.lang.mumps, comp.std.mumps.
(10 Jan 1995)
[Submitted by: Daniel P.B. Smith, Original Author unknown]
[10/97]
The ftp site listed for InterSystems DT-Student is no longer current.
openmsql.intersys.com site has moved to ftp.intersys.com, but
the student version seems not to be there.
[per email from epc2@juno.com]
Since its inception, comp.lang.mumps has been a friendly newsgroup with a comfortable volume, typically one to five messages per day. Recent topics have included: M coding standards/practices/conventions; rumors about possible M vendor mergers; job postings; and inquiries about specific problems with particular M implementations.
If you are on a typical UNIX host at an academic or government institution, one way to check is to type the names of the most popular "newsreaders" -- rn, trn, tin, and nn -- at the command prompt and see if any of them are installed. If not, you probably do not have USENET access and should use the MUMPS-L gateway. If you find that a newsreader is installed, consult an Internet-savvy colleague, system administrator or help desk for more information.
(11/94) Most of the commercial services, including America On-Line, CompuServe, DELPHI, and Prodigy now offer direct newsgroup access. Details for CompuServe are noted below.
For those who cannot get comp.lang.mumps in any other way:
To receive MUMPS-L and comp.lang.mumps:
Send an e-mail message To: LISTSERV@uga.cc.uga.edu The subject line doesn't matter. The message text should consist of the single line: SUBSCRIBE MUMPS-L
Within a short time, you'll get an automated acknowledgement from the list server confirming your subscription and giving other information, and you'll start getting the comp.lang.mumps and MUMPS-L posts.
To post a message to MUMPS-L and comp.lang.mumps: Send an e-mail message To: MUMPS-L@uga.cc.uga.edu
Important: Notice the difference in the addresses. To start and stop subscriptions, you address the request to LISTSERV.
Thanks to:
(11/94) CompuServe now offers direct newsreader access to the Usenet newsgroups. CompuServe subscribers may already using the MUMPS-L gateway, as described above. If you are doing this now and are satisfied with this system, there's no need to change.
Here are the steps I took to read comp.lang.mumps on CIS. Depending on exactly how you're set up (for example, whether you're using CIM), the details may be different for you, but everything should be clear once you GO USENET.
For me: the steps were
The book I've been waiting for.
M is a delightful applications language. Recently I've been struggling with C++ STL, trying to use the "map" container to get perhaps a tenth of the functionality you get from an ordinary M variable, and, believe me, I miss M.
This is the M book we've all been waiting for, and it delivers exactly what it promises. It is, as the blurb says, "the only source M programmers at all levels need."
The style and presentation reminds me a little of Stoustrup's book on C++: the organization and style are tutorial, but not elementary. It is up-to-date with the current standard.
What I particularly admire about it, and what is all too rare in computer books (especially those written by professors of computer science) is that it displays an intelligent awareness of real-world commercial implementations of M. Too many books either describe a pure-standards abstraction on the one hand, or a specific vendor extension on the other. Walters identifies popular M implementations by name and calls attention to variations where appropriate. Like M itself, Walters' book is directed at real programmers trying to solve real problems in the real world.
There are a few places where one can see that the book is an (extensive) rewrite of his older book, rather than a completely new work. I thought it was harder to locate the "argumentless DO" than it should have been, and I felt there should have been a coherent discussion in one place explaining the (historically weird) relations between the various forms of DO, and when $T is and isn't stacked. Similarly, it is disconcerting to see on page 199 that the "NEW" command is described as a "recent extension... not yet formally included in the standard." These are cosmetic problems that do not seriously mar the book I've been waiting for.
[Daniel P. B. Smith]
The following books can be ordered from any M Technology Association. Contact them for prices. In the USA, contact: M Technology Association, 1738 Elton Road, Suite 205, Silver Spring, MD 20903. Telephone +1-301-431-4070.
MUMPS POCKET GUIDE - 1990 by Joel Achtenberg, revised by Thomas C. Salander (MTA item #2018)
A COOKBOOK OF MUMPS by David B. Brown & Donald H. Glaeser, D.Sc.(MTA item #2024)
M Programming: A Comprehensive Guide
M Programming: A Comprehensive Guide is a complete update to ABC's of MUMPS
While ABC's of MUMPS was an introduction for novice and intermediate M programmers, M Programming: A Comprehensive Guide, has a new section containing advanced material. This new section addresses features such as transaction processing, networking, structured system variables, and interfaces to other standards. Five new chapters have been added, covering an overview of M for readers familiar with other languages; M and the Windows environment; interaction between M and the underlying system; transaction processing; interfacing M with other standards; and error handling. Sections on interactive programming and futures have been extensively updated. M Programming: A Comprehensive Guide is an invaluable resource for everyone who is learning or using M.
M[UMPS] by Example
Need to know how M can be used? Need lots of examples to show you how? M[UMPS] by Example is your answer!! This book can be used as a first step to explain the language elements, including the most current additions. Here you'll find out how to use the language and take advantage of its strong points. You will also be shown the spectrum of M -- from the very beginnings to the latest -- as well as developments that are currently being formulated. Created by Ed de Moel, past Chair of the MUMPS Development Committee (MDC), this book is up-to-date Information.
ABC's of MUMPS
This book is no longer available.
See the new title, M Programming: A Comprehensive Guide to
order.
The Complete MUMPS
This excellent book is both a learning tool and a reference manual. It explores the basics of M's unique file structure, using examples and exercises to demonstrate specific functions. The well organized appendices and index provide rapid access to specific information needed to develop complex applications. The text includes functions of the 1990 standard.
Introduction to Standard MUMPS
Subtitled: A Guide for the Novice, this work introduces beginning programmers to key aspects to M as a programming language and an operating system. Each chapter leads users through a series of exercises and follows with review questions based on the new material. Appendices include additional review questions and solutions to each chapter's mini-tutorials. This is an important starter' volume for anyone interested in the M language.
The MUMPS Handbook of Efficiency Techniques
This handbook contains 125 ways to make M applications run faster, based on actual case studies of M installations over an 11 year period. Plus, this book contains code for a software package called ANALYZER that determines which M code is slowing down the programs within an application. If you need to finetune an existing application or create a new one, this book's for you!
Standard M Pocket Guide
This is the must have pocket reference for any M programmer! Use this pocket-sized booklet covering the 1995 standard for a quick reference, or use it to refresh your understanding of the elements of the language. It's a practical guide for beginning and experienced programmers alike. And inexpensive enough to afford a copy for everyone!
M Programming Language Standard ANSI/MDC X11.1-1995
This 1995 reference work contains a three section description of various aspects of the M computer programming language. Section 1, the M Language Specification, consists of a stylized English narrative of the M language. Section 2, the M Portability Requirements, identifies constraints on the implementation and use of the language for the benefit of parties interested in achieving M portability. Section 3 is a binding to ANSI X3.64 (Terminal Device Control Mnemonics).
How To Make A Computer Work For You -- An Introduction to the File Manager System
Learn how to computerize your own information management needs with the power of VA FileMan. This introductory volume is especially well-suited for non-programmers who can learn how to design, edit, and retrieve database information. It's the perfect supplement to your VA FileMan documentation!
FileMan Database Management -- System User's Technical Manual
Discover the uses and features that make VA FileMan today's database management system of choice. You'll learn the basics and advanced concepts about data input and retrieval options, database setup, programmer tools, and the data dictionary.
FileMan: Database Manager User Manual Volume II
The VA FileMan manual introduces two different groups of people to the VA FileMan database manager: those with newly acquired interest in learning about advanced database managers; and experienced database managers. Volume II covers advanced database theory and practice to provide a comprehensive reference for the non-programmer user of VA FileMan.
MDC Type A's
MDC Type A Document Collection: Extensions to ANSI/MDC
X11.1-1995
Aren't you wondering how the NEXT ANSI Standard will be
different from the 1995 Standard? Well, the answer is Now
Available. The documents in this collection are approved by the
MDC as proposed enhancements and extensions to the current ANSI
Standard, ANSI/MDC X11.1-1995 M Programming Language. They are
part of the current MDC Standard. Also included in this
collection are the documents that are approved by the MDC as
proposed enhancements and extensions to the current ANSI
Standards, ANSI/MDC X11.2-1995 Open MUMPS Interconnect and
ANSI/MDC X11.6-1994 M Windowing API. They are all part of the
current MDC Standards.
[part of Keith Lynch's .signature; it prints a table of primes, including code to format it neatly into columns -- [Daniel P.B. Smith]
I really like the way that the global tree is "just there" without any file opening, record declarations, and the like.
This feature is comparable to what ISAM (Indexed Sequential Access Method) packages offer for other languages, but it is more powerful than ISAM and it is seamlessly integrated into the language. It is *not* a relational database system, although it can serve as a basis for implementing one and does so in several commercial products.
The sparse hierarchical array structure assumed by M is a much more natural fit for this type of data.
InterSystems and Micronetics offer versions of M that implement the MWAPI in a MicroSoft Windows environment. Digital has an implementation [is it commercially released? Details?] for Windows NT.
The M Windowing API and its commercial implementations are relatively new and have rough edges. The MWAPI has the advantage of portability and platform-independence, but has some limitations associated with the "least-common-denominator" approach.
A unique feature of the MWAPI is that this "API" does not consist of subroutine calls (except for a few incidental functions). MWAPI programming consists mainly of performing sets and kills into a "structured system variable," which looks like a standard M global. For example, to set the title of a window to "M Technology Demonstration," you write
s ^$WINDOW("main","TITLE")="M Technology Demonstration"
To make its dimensions 300 by 200, you write
s ^$WINDOW("main","SIZE")="300,200"
The MWAPI is currently offered for MicroSoft Windows by InterSystems and Micronetics, and for Windows NT by Digital Equipment Corporation. It is often presented as the windowing future for M technology.
Micronetics' MSM-Workstation product provides a Visual-Basic-like environment entirely based on M and the MWAPI.
Examples from the DT-Windows manual and MGM product literature, respectively, show how an "OK" button is added to a dialog box:
DT-Windows: w /waddbutton(2,65,40,10,20,1,1,1,0,0,0,"OK",1)
MGM: W /DBUTTON("OK",2,9)
MTA-Europe publishes "M Professional" a news/technical journal in English 3 times a year. MTA-Europe members receive it free. Non-members can order a subscription.
Other MTAs also produce newsletters, mostly in local languages. Contact them directly for more information.
M and MUMPS are alternate names for the same language.
M, the newer name, is now very widely accepted in the M community. The name change was introduced to address long-standing problems with the name MUMPS. The name MUMPS gave many the impression that the language was specifically for hospitals and health care applications. Many also felt it was undignified.
M/MUMPS has evolved rapidly, with new ANSI standards being successfully issued in 1977, 1984, 1990, and a new standard now in canvass, which will probably issue in 1995. It is not the same language that it was in 1967.
Approximately 2,000 individuals/organizations belong to M Technology Association-North America, with approximately another 1,000 belonging to other MTAs.
Versions of the M language are available from twelve vendors on every significant hardware platform. Some versions provide direct support for non- English languages, for example German, Russian, Japanese.
But: "The national meeting of the MTA draws fewer attendees than the northeast regional meeting of the SAS Users' Group."
The Gartner Group report, "1992 MUMPS Assessment and Opportunity," notes: "[M-based trust software from NCS] is used by several of the top 200 U.S. banks to control more than 375 accounts totaling $600 billion in trust assets. Lloyds of London, Barclays, and Bank of Bermuda ... use M systems... M moved into communication, shipping and transportation, law enforcement and other areas in the 1970s and 1980s. The Veteran's Administration, Discovery Channel, Coca-Cola and Schweppes, Ltd. Star Shipping, and the Law School Admission Service are among the M users."
A recent M Technology Association press release describes how M Systems Plus won a contract with American Express's Travel Related Service Division (AMEX) in Atlanta contract to convert 2,000 cruise bookings acquired from a West Coast firm. It is said that the M System was designed and developed within two and a half weeks, and was up and running on schedule, processing over 500 telephone booking inquiries the first day. It has since been expanded to include brochure fulfillment, customer service, word processing, questionnaires that gauge customer reaction, and agent telephone activity tracking.
One vendor, ESI is marketing a development system, ESIObjects, that allows fully object-oriented programming in M. ESI, 5 Commonwealth Road, Natick, MA 01760, +1-508-651-1400, FAX +1-508-651-0708
If you want to code in a structured style:
The M "ELSE" statement is a simple executable statement. It is not syntactically paired with an IF. The semantics are, approximately: a special system value, $TEST, is reminiscent of the "condition bits" in some processor. An IF statement sets the value of $TEST according to whether the condition was true or false. An ELSE statement is equivalent to IF '$TEST (the apostrophe is the "not" operator). Unfortunately, the traditional MUMPS subroutine does not push and pop the state of $TEST. Thus,
If a>b Write !,"a is greater."
Else Write !,"b is greater."
performs as expected, but
If a>b Do REPORT1
Else Do REPORT2
may not, particularly if the REPORT1 subroutine itself contains If statements of its own.
This problem is solved by a feature called the "argumentless Do." Actually the argumentless Do plays three separate roles in M programming:
If condition1 Do
. If condition2 Do
. . <code> ;executes if condition1 and 2 are both true
. . <code>
. . <code>
. Else Do
. . <code> ;executes if condition1 is true but not condition2
. . <code>
. . <code>
Else Do
. <code> ;executes if condition1 is false
. <code>
. <code>
I'm not convinced that the "while" exactly counts as a feature of MUMPS - in fact, an argumentless FOR with a QUIT is a "repeat...until", for a "while" you would need to perform an initial IF. Do such composite statements really count as proper controlled loops?
Even if MUMPS is technically structured, it goes (IMHO) against the spirit of structured programming with commands reduced to a single letter whenever possible, short variable names encouraged, and no white space. The significance of the space character (in argumentless commands) is completely counter intuitive.
I can't say that technically you're not correct in mentioning the above features but one of the primary aims of structured programming is to make support of existing code easier. In my experience, MUMPS encourages hacking and badly designed code.
A "JOB" command allows one process to initiate other, independent processes. Processes can arbitrate access to resources with each other via a "LOCK" command.
There is no specific formal interprocess communication. Interprocess communication is achieved via the LOCK mechanism and shared use of "global" data (which are available to all processes)
Thus, the same programming techniques used to build multiuser and multiprocess applications on a single system can be used to build distributed network systems.
In addition to this explicit networking most vendors allow for implicit network referencing, allowing system managers to choose the location of data independent of the application programs.
A networking protocol standard, "Open MUMPS Interconnect," provides least- common-denominator capability so that systems from different vendors can participate on the same network. In addition, for competitive reasons, most vendors support the major protocols of their competitors.
An M-based LAN system in use at Brigham and Women's hospital, with 3,000 PC clients and over 100 servers, is a well-known and very successful application of the technology.
There are also a number of systems with M operating in more complex client/server situations, with M acting as a front-end to other systems and also a back-end via RPC etc to applications created using other tools, for example Visual Basic, C++ and so on.
1984: revised ANSI standard ANSI/MDC X11.1-1984
1986: approved as a Federal Information Processing Standard (FIPS)
1990: revised ANSI standard ANSI/MDC X11.1-1990
1992: accepted as an international standard, ISO/IEC 11756-1992
1993: revised FIPS 125-1
1995: revised standard in ANSI canvass procedure for approval as ANSI/MDC X11.1-1994 (or maybe 1995) and distributed for comments in ISO as ISO/IEC 11756-1995.
1995: M Standard: December 1995, ANSI approved X11.1 (1995 Programming Language) and X11.2 (Open MUMPS Interconnect)
M accesses its database at low level, almost like programming in ISAM level. SQL works on the relational level, a higher level of abstraction.
Both have a line-oriented, verb-object type syntax.
M has additional features: better string handling, multidimensional string-indexed arrays, persistent variables, multitasking, multi-user support, dynamic code.
M offers greater standardization and portability. Although there is an ANSI standard for BASIC, it is of little practical importance because few vendors conform to it, it is not rich enough to permit development of real-world applications within the standard, and there is a tradition of non-standard vendor extensions.
The state of M standardization is superior. The Veterans' Administration, in particular, took a leadership role in writing validation suites that assure vendor conformance to the standard.
Vendor choice: BASIC is currently dominated by a single company, MicroSoft. There are other vendors but few have any practical importance. M is available from a wider range of vendors.
Answering complex questions is one of the biggest reasons we invest in the time and expense of using a database management system. Several types of graphical products exist today to help you query your database. Of these, dedicated front-end query and reporting tools such as Borland ReportSmith for Windows and Intersolve Q+E are probably the best-known in corporate environments. Such tools are typically client applications designed to query data from corporate databases residing on client servers. Typically, these products have no built-in data-management capabilities; many require you to have a detailed knowledge of your database and the workings of relational databases in general.
PC-based database management systems let you construct queries and produce reports. You need a fair amount of database savvy to construct a query that produces the right result. Fortunately, the products are getting better at making this process easier. The two leading PC-based database management systems are Microsoft Access 2.0 and Borland Paradox for Windows 5.0.
A query is a request for information from a database. Methods for specifying a query have improved over time. Traditionally, one would have used SQL, or structured query language. In the late 1970s, IBM Research developed a new query technique called QBE, or query by example. In QBE, one supplies query details by filling in a table with values. For instance, to locate rows where the state value is New York, one would move to the State column and enter NY. To find salaries greater than $40000, one would enter > 40000. The basic idea of QBE is to make the dialogue easy to learn and reduce any reliance on keywords or language syntax.
It is possible to set up a database in M using a tool such as the VA Fileman package. Reports can be generated by means of the Report Writer feature of VA Fileman. Related records in a database are organized together to form a file, or in MUMPS terms a global. A field is a unique observation or data element. A record is comprised of one or more fields, a file (or global in M) is a collection of records and a database is the collection of all files comprising an application.
"I used to build applications with DASL... One of the things I really liked about DASL is that it handled a lot of routine stuff, allowing me to build applications in about 30% of the time that it would have taken with straight M coding -- which, in turn, is considerably faster than coding in most other languages :^) Because DASL is written in M it was easy to modify to add special features."
ftp vets.vetmed.missouri.edu
Connected to vets.vetmed.missouri.edu.
Name (vets.vetmed.missouri.edu:dpbsmith): anonymous
331 Anonymous Login OK, send id as password.
Password: [type in your e-mail address here]
230-User logged in
230- Welcome to the University of Missouri-Columbia Department of
230- Veterinary Medicine and Surgery FTP Server.
As of 1/95, this location appears to contain everything from the NEMUG BBS, as well as DT-STUDENT and the M FAQ. See the description of the NEMUG BBS, below. -- [Daniel P.B. Smith]
(7/94) Approximately 150 M-related files available for download.
Examples:
MUGLIB1.LZH | Part 1 of MUGLIB Disk 11. Use LHA to extract (06-20-92) |
XPORT.RO | Short M routine to change globals (06-27-93) |
UTILS.EXE | Various MUMPS utilities (08-17-92) |
CALC.EXE | M CALCULATOR - VER 3.00 - PKZIP EXE (11-14-92) |
COWRITER.EXE | This is a Free CoWriter Demo. (03-18-92) |
DSRECOV.ZIP | Recover crashed DataTree %dsbackups (09-09-92) |
DTM-EDTR.LZH | Full-Screen editor for DataTree MUMPS. Use LH (06-19-92) |
HASEDIT.EXE | MUMPS Editor from High Altitude. (10-19-90) |
KERM-MGB.LZH | KERMIT-M for CCSM MUMPS. Use LHA to extract f (06-19-92) |
MSMSHELL.UTL | MSM's Programmer Shell Utility (12-30-91) |
MUMPS53.LZH | UC Davis MicroMUMPS Ver 5.23 ($H Fix). (06-11-92) |
NOUS134.LZH | NOUS is a MUMPS Interpreter which contains Pr (09-23-92) |
STUDENT.EXE | DT-STUDENT. FREE MUMPS System. Auto Pkunzip. (09-15-92) |
TMM.LZH | TURBO-MicroMUMPS is a MUMPS Interpreter. (10-19-92) |
FMV20.ZIP | VA FileMan Verion 20 (09-23-93) |
FMPRO.LZH | VA FileMan Programmer Manual. Use LHA210.EXE (06-15-92) |
XMTECH32.LZH | MailMan 3.2 Technical Manual. Use LHA210.EXE (06-15-92) |
HURST.ZIP | MUMPS games and files for ISC's M/VX. (09-16-91) |
IDEAFACT.EXE | The Idea Factory by C. Volkstorf (03-23-92) |
MBBS792.TXT | Other known MUMPS BBS Boards as of 7/92 (07-24-92) |
POSTNET.ZIP | print USPS POSTNET barcodes using M (06-01-93) |
SSVN.TXT | Guy Gardner's paper on SSVN's for Windowing (03-04-92) |
Focussed on the VA's Distributed Hospital Computer Program (DHCP); not a general-use M BBS.
General Users 617 225-0475
VARS 617 494-0867
(7/94) CompuServe forum "PC Vendors (H)" is shared by a number of vendors; Micronetics occupies section 8 for messages, and DL 8 for files. The forum has received about five postings in the last two weeks, and is basically an extension of Micronetics' support services. Most threads begin as customer questions addressed to Micronetics support, and most files are product patches press releases, etc.
(7/94) Content similar to Micronetics section on CompuServe. Primarily a customer support mechanism. [Micronetics Explorer, a student version of MSM, appears to be available for downloading from this BBS as EXP1.ZIP and EXP2.ZIP].
Some examples of files available for downloading:
%ZAB.RTN MUMPS 624 05/94 Display $ZA bit settings for device... 3C507.COM MAIN 5.4K 03/91 3COM 3C507 Packet Driver 408H.NOT MUMPS 7.9K 05/94 Release notes for Version 4.0.8H AGENDAS.ASC MUMPS 24K 09/91 MSM COURSE DESCRIPTIONS BISMMARK.RTN MUMPS 8.3K 04/94 Benchmark routines... COLOR.RTN MUMPS 1.8K 02/94 COLOR DEMO -- GUI EXP1.ZIP MUMPS 1.3M 12/93 Explorer File (Database) 1 of 2... EXP2.ZIP MUMPS 1.0M 12/93 Explorer File (Executables) 2 of 2... GBMAINT1.RTN MUMPS 7.0K 05/94 GLB Compression fix for PC/Plus ver 4.0.9 only
Sysop: Gardner Trask
Baud: 300, 1200, 2400 and 9600
8 bits, no parity, one stop bit
MNP5 error correction protocol 2400/9600 baud
24 hours, free
The New England M BBS was the largest and longest running BBS dedicated to the M community. It served as a communication point at a time when the Internet was still not available to the public. The popularity and explosion of the net made the BBS mute.
M Newsgroups?
Currently, there is one newsgroup dedicated to M on the internet. It is: comp.lang.mumps Previously, a moderated newsgroup dealing with M standards was abandoned whem c.l.m.'s popularity grew.
M Web Pages:
This list is never quite complete, and subject to old links. Please inform Gardner of any new, deleted, or modified Web Addresses (in no particular order):
Vendors | |
www.intersys.com | InterSystems Corp. |
www.riosoft.softex.br/~x10tech/ | Extensao Software Corporation |
M Language technical resources and enhancement projects | |
www.vmth.ucdavis.edu/M/mhttp.htm | Jim Self's MHTTP Server |
www.mcenter.com/mtrc | M Technology Resource Center |
ftp://vets.vetmed.missouri.edu/mumps | FTP site for M files |
MDC, MTA, User Groups, and Standards Bodies | |
http://71.174.62.16/MDC/index.html | Mumps Development Committee |
www.members.aol.com/mta1994/mta.htm | M Technology Association |
www.mindspring.com/~mga | Mumps of Georgia Users Group |
www.mtauki.co.uk/ | MTA - UK & I |
www.ua.ac.be/mta/ | MTA - Europe |
www.klinik.uni-frankfurt.de/mug-d | MUG of Deutschland |
www.uku.fi/jarjestot/myhdistys/ | MUG - Finland |
www.montagar.com/~swmug | The Southwest Mumps Users Group |
www.itl.nist.gov/ | Computer Information Laboratory |
www.mcis.duke.edu/standards/guide.htm | Healthcare Informatics Standards |
www.itl.nist.gov/div897/ | Software Diagnostics & Conformance Testing Division of NIST |
M publications, e-zines, software, etc. | |
www.geocities.com/SiliconValley/7041/mwm.html | MWM: an electronic e-zine on M |
www.members.aol.com/mta1994/public.htm | Books on M Technology |
www.mtauki.co.uk/mtapubs.htm | Books on M Technology from MTA-UK&I |
www.members.aol.com/mta1994/softwar.htm | M Technology Software |
www.mtauki.co.uk/mtasoftw.htm | M Technology Software from MTA-UK&I |
ftp://vets.vetmed.missouri.edu/mumps | FTP site for miscellaneous M files |
www.va.gov/dhcp/cdrom/software.htm | MUMPS programs on the VA server |
www.mtechnology.org/mtapubs.html | M Publications from MTA-NA |
Classes/Tutorials | |
www.isc.rit.edu/~nat4087/MUMPS/ | Rochester Institute of Technology |
M people | |
www.geocities.com/SilliconValley/7041 | Chris Bonnici's M Home Page |
www.cs.uni.edu/~okane | Kevin C. O'Kane |
homepages.enterprise.net/andreww/ | Andrew Webb's Homepage |
www.world.std.com/~seidman/aaron.html | Aaron Seidman 's Homepage |
www.i1.net/~jelkins/ | The Jim Elkins Home Page |
Other Companies related to, using, enhancing M | |
www.atlasdev.com | Atlas Development |
www.connexsys.com | Connex Systems |
www.seasystems.com | Sea Change Systems |
www.cytools.com | Cybertools |
www.kbsystems.com | KB Systems |
www.sentientsystems.com | Sentient Systems |
www.tiac.net/users/kra/ | Kogan-Rose Associates |
www.hwsl.co.uk/mgw | M/Gateway Developments Ltd |
www.henryelliottandco.com/ | Henry Elliott & Company |
www.mcenter.com/tyler/ | The Tyler Group |
www.mindspring.com/~mga/corp-01.html#CPU | Career Professionals Unlimited |
www.techassociates.com/ | Tech Associates |
www.megaforceusa.com/ | MegaForce |
www.dice.com/prc/ | Professional Recruiting Consultants |
www.members.gnn.com/Emergent/et-top.htm | Emergent Technologies |
www.beaconpartners.com/red.html | Beacon Partners Consultants |
www.eskimo.com/~lci/ | LCI Homepage |
www.yonder.com/ | Yonder Technologies |
www.cyberspy.com/~kaycom/ | Kay Communications |
www.fthill.com/ | Foothill Solutions |
www.esitechnology.com | ESI Technology |
www.arnet.com/ | Digi International |
www.dht.com/ | Dynamic Healthcare |
www.idx.com/ | IDX Systems |
www.partners.org/bwh/home.html | Brigham and Women's Hospital |
www.hboc.com | HBO&Company |
www.kaiperm.org | Kaiser Permanente |
www.consult.hsc.wvu.edu/ | WV Consult |
www.va.gov/vama.htm#DHCP | Department of Veterans Affairs |
www.omegalegal.com/ | Omega Legal System |
www.isg-us.com/ | International Software Group |
www.georgejames.com/marina/ | George James Software |
www.srcorp.com | System Resources Corporation |
www.bender.brooks.af.mil/www/ | MEDSITE |
www.corningbesselaar.co.uk/ | Corning Pharmaceutical Services |
www.labcorp.com/ | LabCorp |
www.hogan1.atiin.com/uniband/ | UniBand |
www.epic.net/asianterminals/ | Asian Terminals |
www.ultranet.com/~scision/strate.html | StrateCision |
www.ctg.com/ | Computer Task Group |
www.intraco.com/ | Intraco Systems |
www.epicsys.com/ | Epic Systems |
www.jacquardsystems.com/jsr.html | Jacquard Systems Research |
www.partners.org | Partners Healthcare System, |
www.sunquest.com | Sunquest Information Systems, Inc. |
But why 1841? According to Steve Clay, sbc@pobox.com, the following answer appeared in the "Just Ask!" column of the September 1993 issue of "M Computing," a publication of the M Technology Association, Silver Spring, MD 20903 (Phone: 301-431-4070), in the form of a letter from James M. Poitras:
"Starting in early 1969, our group created the Chemistry Lab application at Massachusetts General Hospital (MGH), which was the first package in the MGH MUMPS with Global Data Storage and many of the features of the language today...
"When we started programming, there were no utility programs of any type. We had to write them all: time, date, verify database, global tally, print routine, etc. I ended up writing initial versions of most of these.
"That's the origin of December 31, 1840 or January 1, 1841. I wasn't party to the MDC negotiations, but I did explain the logic of my choice to members of the Committee."
Gardner Trask has provided the following guide:
Function | MSM | DSM | MVX/MSQL | DTM |
---|---|---|---|---|
Utility Menu | %UTL | %UTL | UTIL | zzu |
Routine Directory | %RD/%ROU | %RD/%RDX | %RD/%RDISP | %rd |
Routine Print | %RP | %RS/%ZTPP | %RO/ZP | %rsave |
Routine Change | %RCHANGE | %RCE | %RCHANGE | %rsearch |
Routine COmpare | %RCMP | %RCMP | %RCMP | %rloadcompare |
Global Directory | %GD/%GLO | %GD | %GD/%GDISP | %gd |
Global List | %GL | %G | %G | %g |
Global Edit | %GEDIT | %GEDT | %GED | %gedit |
Global Change | %GCHANGE | %ZGE | %GCHANGE | %gedit |
Global Transfer | %GCOPY | %GC | %GOQ/%GIQ |
A number of people have talked about the performance/maintenance issues with comments, so I thought I'd clear things up a bit, at least for the implementations that I deal with (ISM, DTM).
Double semi-colon comments are placed in-line into the object code, so it is best (from a maintenance view as well) to have a separate label for each logical section of data, followed by lines of ;; data, that is not in any path of execution.
For normal comments, if they are at the end of a line that already has code on it - there is absolutely NO effect at all on performance, so comment to your hearts content.
If the comment is all that is on the line, there is still a beginning of line token - which can be expensive, especially in frequently executed loops. The reason is that the BOL token does a lot of work after every so many lines, such as allow the next process to run (on systems like DTM), or check for ^C, ^RESJOB, or other inter-process communication.
For long runs of comments, such as the maintenance section at the top of a well written routine, if you have M/SQL (for ISM, DTM, DSM or MSM), you can simply use the macro pre-processor and bracket the code in
#if 0
...
#endif
This technique totally eliminates the overhead, but it does mean that the maintenance section is not present in the M source, only in the macro source (this can be an advantage if you ship M source to customers, but don't want them to see all of your descriptions of bug fixes). Alternatively, try not to start execution on the first line, but use a label after the comment section. (i.e. DO entry^foobar instead of DO ^foobar)
MTA-North America acts as the MDC Secretariat and publishes all documents pertaining to ANSI X11.1, including the Standard, bindings specifications (for example, X Windows, SQL and GKS) and MDC proceedings.
There are also counterparts to the MDC in Europe, Brazil and Japan (MDCCs) which feed in non-US contributions and have voting rights at the MDC.
We are looking for some historical information on the evolution of M to be published in an article. It seems natural to turn to the members of this newsgroup inviting you to provide any information on this you may have. Your consideration in providing us with your knowledge about the history of M is deeply appreciated.
Thank you one and all.
Monika Kratzmann
InterSystems Corporation
It's not clear what specific kinds of info you're looking for, but here's a brief note on the beginnings, at least as far as I recall:
The language was developed at Massachusetts General Hospital in a lab run by
Dr. Octo Barnett. It was developed with federal grant money --- hence was in
the public domain, and the name MUMPS stems from
Among the chief developers was Neil Pappilardo who later left Mass Gen, and started Meditech, adding some proprietary features to MUMPS and calling the result MIIS (Meditech Interactive Information System) --- marketing medical records systems to hospitals, clinics, medical labs, etc.
At Mass Gen, the language was used to deal with clinical medical data --- hence its strengths in string handling (lots of text data), sparse arrays (not every patient undergoes every possible lab test), and other such features. The original platform was (at least I think it was) a PDP-15. It was later ported to the PDP-11 and other similar "minis" such as the Data General machines like Novas and Eclipses.
As the idea spread among other medical researchers, people began adding other features, and there soon developed a whole bunch of "dialects" which frustrated the researchers because they couldn't exchange software very easily. To solve that problem, the MUMPS Users' Group was formed and efforts to standardize the language began. Dr. Barnett was among those who was most forceful in arguing for the creation of MUG and the standardization effort. I do not remember who first proposed that ANSI approval be pursued. The current MTA organization is what MUG has evolved into, via the name change. I believe Joan Zimmerman was the first MUG staff member, and she wrote (or edited?) some of the first MUMPS tutorial materials published by MUG.
There is probably lots more material, and details, available from the MTA "archives", and other people who were involved in those early days. Perhaps some of the other newsgroup members will know how to contact some of the people I've mentioned. For example, there is a short history in Chapter 1 of "The Complete MUMPS" by John Lewkowitz. There are also some historical notes in the MUMPS FAQ (for example, "What happened in 1841?").
I hope the above is both accurate and helpful.
As I recall it, the original platform was the PDP-9.
I think the original plarform was a PDP-8. When the language was adopted by DEC it was a stand-alone OS called MUMPS-11 on PDP's.
I can't remember MUMPS for Novas but I can remember MUMPS for Tandem Main Frames with a Multi-Cpu built in functionality.
Good luck.
Jacob Lev.
The original platform was a PDP-9. When the MGH version was picked up by DEC it was productized onto the PDP-15. A couple years later it was rewritten by DEC for the PDP-11. The systems were standalone. The date that DEC officially picked up a magtape of MUMPS (PDP-9) from LCS at MGH was October 3, 1970. It was a pleasant fall day. The PDP-15 MUMPS system was installed at its first site (Health Data Management Systems of Denver) in May 1971. It took two hours to install, amazing everybody on the site, who were expecting a week or two effort.
Dr. Octo Barnett was in charge at the Laboratory of Computer Science at MGH. Neil Papalardo and Bob Greenes were major contributors. Neil went on to form Medical Information Technology (Meditech), Greenes was a medical doctor as well as holding a PhD in computer science - both degrees awarded simultaneously from Harvard. Bob went on to be President of Automated Health Systems of Wakefield MA and Burlingame CA.
In a Boston meeting in Fall 1972 Bruce Waxman of NIH told the audience in no uncertain terms that if they wanted to get NIH money for their computer projects they damned well better be using MUMPS, that NIH was not interested in reinventing THAT wheel, thank you. MUMPS took off.
I was the original product line and technical leader on MUMPS-15 at DEC. Paul Stylos was the technical leader for MUMPS-11. Evelyn Dow was the original Marketing representative. And let us not forget Dave Ensor of Scotland, who made significant technical contributions. The DEC executive who originally saw the value in MUMPS was Stan Olsen. Sam Moulton was also on the technical side.
Respecfully,
Dan Brevik
Well, Jacob, all I can say is that when I first encountered MUMPS (in the early to mid 1970s), it was MIIS on a PDP-15, and I later worked on a Data General machine, also MIIS. Both of those were stand-alone systems, dedicated to MUMPS (or at least a MUMPS-like, derivative, language).
Hi, Monika... There is a 16-page article, "History of the Development of Medical Information Systems at the Laboratory of Computer Science at Massachusetts General Hospital" by G. Octo Barnett, MD, in "A History of Medical Informatics," edited by Bruce I Blum and Karen Duncan, published by the ACM Press (Addison-Wesley), 1990, ISBN 0-201-50128-7. I bought it on sale for five bucks at Quantum. It's almost certainly out of print but it couldn't hurt to ask Quantum if they have any more copies kicking around.
According to the article, the first implementation, of a language called MUMPS, by Neil Pappalardo, was on a PDP-7. Not a PDP-15 or a PDP-9, a PDP-7.
He traces its origins from JOSS through BBN's Telecomp and StringComp.
Richard Walters' "An ABC of MUMPS" contains a "Brief History of MUMPS" on pp. 20-22 with a family tree showing the root in Rand Corporation JOSS, through BBN JOSS, via TELCOMP and STRINGCOMP to MGH MUMPS.
Now this brings back some memories. I remember using TELCOMP back in 1969 (27 years ago). We used it, via a dial up line, on a PDP-7 (TELCOMP II) and later on a PDP-10 (TELCOMP III).
I don't remember much about the machines that we used other than that we leased time from a company called Time Sharing Limited of Great Portland Street, London. I also have a note from that time about on-line storage charges. It cost 30p (about 45 cents) per 640 byte block per month!
The family resemblance between TELCOMP and M is just about recognizable especially if you were familiar with MUMPS-11.
The following is a fragment of TELCOMP code that was written on 12 December 1971:
1.04 TYPE #,"ENTER ONE OF THE FOLLOWING:-";MENU 1.05 TYPE FORM X FOR X=1:1:4 FOR END=10^15 1.06 READ GRNO IN FORM 15 1.065 DONE IF GRNO=END 1.07 TO STEP 1.06 IF GRNO>4 1.08 TO PART GRNO+1 2.01 DO PART 50 2.02 READ N,K 2.03 DO PART 51 2.04 TO PART 15 .. 15.01 LINE FOR X=1:1:3 15.02 TYPE MINPL,MAXPL IN FORM 17 15.03 TYPE FORM 17 15.04 DO PART GRNO+15 FOR X=MNPL:STPL:MXPL 16.01 Y=(X^N)+K 16.02 Y1[X]=(((Y-MNPL)/(MXPL-MNPL))*2)-1 .. FORM 15 ITEM NUMBER? ##### FORM 17 MINIMUM ##### MAXIMUM ######Comparison with M:
Clearly some of the origins of M can be seen in TELCOMP. Does anyone know where the idea for globals originated? What elements did other languages, such as JOSS bring to M?
Regards
Etienne Cherdlu
This takes me back too! Oh for the good old days - when programmers were really programmers, disks were 2.5Mb in size and part numbers ranged from 0.01 to 327.67 (or some such obvious number)!!!!
Well, the comment is not totally accurate - line numbers only had 2 decimal places if you're being really picky.
BTW I used to know magic numbers - 84, 84*84 84*84*84 etc FWIW. I've now forgotten what they were, but I'm sure some of you MUMPS-11 people must remember? I do know why I needed to know them, but that's another story...
Jon Diamond, Cap Gemini UK
Go Proverb: "On the second line 6 die, 8 live"
Now, in languages like Pascal and C, you would create an
array with 50 members, and you would build a table:
State[0] = | (pointer to string) | "Alabama" |
State[1] = | "Alaska" | |
... | ||
State[49] = | "Wyoming" |
Capital[0] = | "Montgomery"; | Abbrev[0] = | "AL"; |
Capital[1] = | "Juneau"; | Abbrev[1] = | "AK"; |
... | |||
Capital[49] = | "Cheyenne"; | Abbrev[49] = | "WY"; |
If you want to loop through these arrays, you don't need any special functions: there are 50 elements in each, and "for i = 0 to 49" or for (i = 0; i < 50; i++) will do just fine.
In M[UMPS], arrays can be done in the same fashion, in which case
For i=0:1:49 would do just fine to loop through all states,
but it is much more common to use a different method of
indexing the array(s), using a string as an index.
You could store the array as:
State["AL"] = | "Alabama/Montgomery" |
State["AK"] = | "Alaska/Juneau" |
... | |
State["WY"] = | "Wyoming/Cheyenne" |
However you "index" the array, the addressing will not be as
simple and straightforward as in traditional languages:
Or, a simple loop across all states would look like:
Set index="" For Set index=$order(State(index)) Quit:index="" do...
The function $order looks at this internal table, and tells you what the next index is after the one that you specify.
So... At the first call, the specified index is "" (empty string),
and $order will look for the first entry in the table. Currently
this is "AK". After "AK", $order would find
"AL", "AR", "AZ",
etcetera, up to "WY".
When called with the "last" index ("WY"), $order would return
the value "" (empty string) to signal that it could find no more
members.
Now, that seems fair for an array like this, and we'll always have
the same 50 members, and always find the same ones in the same
order, so why go through all this bother?
Well, that will become clear when you're dealing with sets that
are more dynamic in nature. Suppose that Good Old Fidel finally
steps down and Cuba requests membership as a state, there would
be a storm of protests, but let's assume that the request would
be approved. In most other languages, we would have to do a
lot of recoding to insert Cuba in the "proper" place in the
new array of states. In M[UMPS], all we have to do is
Set State("CU")="Cuba/Havana"
$order(State("CT")) currently returns "DE", but after this insertion, it would suddenly return "CU", and $order(State("CU")) would return "DE": by the way of indexing that M[UMPS] does for you "behind the scenes", indexes are always stored in alphabetic order, and you won't have to worry where things are, or how to get them into the proper sequence.
Of course, this is where it starts to matter what value you
use for an index:
In this example, I also used another "idiosyncracy" of M[UMPS]:
I stored "State/Capital" into one single value. You would use
the function $Piece to separate out these values. Whether you
would use a set-up like I depicted above, or
State(abbreviation,"Cap")=capital
State(abbreviation,"Name")=name
is up to the needs of your application.
Of course (and I don't want to say that M[UMPS] is an object oriented language, it's 30 years old now, and definitely showing its age), this is a feature that you see a lot nowadays in object oriented programming as well: you pass the complete object, and leave it to the recipient-software to figure out which properties of the object are interesting to it.
I think M is a *perfect* language to learn about fundamental programming principles.
Software engineering can come later - and is abusable in any language.
A computer handles three types of execution - sequential, conditional and iterative. Each type can be demonstrated (and learned) in M with no messing about - no 'declarations', no 'introductions', no 'directives', no compiling etc...
Experienced programmers forget how they learned to program - Ken Knecht's 1979 definition of a string in 'Microsoft Basic' from the dilithium Press as 'a group of alphanumeric characters surrounded by double quotes' left me blank for weeks - what did he mean by group?
Character mode M is (at least) as good as the original 'basic's were for discovering what computers can 'decide' and 'think' and 'store'.
Don't listen to the experts -- they forget from whence they came.
Show him M (and follow up with Java).
Regards
Paul Perrin
Paul Perrin wrote:
>I think M is a *perfect* language to learn about fundamental programming
>principles.
For some reason, it surprises me that I tend to agree. <g> Before a "beginner" can even begin to grasp such things as "structured programming", "top-down", etc., they have to get a good feel for the basics. Things like Control, ALU, I/O, and Storage. M brings you a lot closer to the basics than many higher(?)-level languages.
Also - for educational purposes, interpreted languages are great. Nothing is going to give a better instant gratification kick than being able to type a command directly and get an immediate answer. <g>
><snip>
>Show him M (and follow up with Java).
>
THAT will send him running back to M in a hurry. :)
Floyd Dennis
First up is a description of the work done by Kevin O'Kane in this area:
M-based Internet Extentions / languages
This site contains a research Mumps interpreter for medical informatics applications. This interpreter is for a subset dialect of Mumps and is designed to provide medical records access for Internet and Intranet Web servers. This system works directly through the Web Server Cgi-Bin interface without the need for intermediate programs or files, unlike other systems. Versions are available for download for several systems as listed below. The system is small, reliable, portable and extremely fast. A recent test of this system operating under Linux with the Apache web server on an unoptimized Pentium 120 gave data base response times in excess of 25 data base transactions per second. This result is scalable to larger processors and faster commercial servers. Due to the hierarchical nature of the data base, the data base is easily distributed among multiple servers. See the documentation links below for complete details including downloading a prototype medical records system written in MumpsVM.
Documentation: MumpsVM Language Manual Including Prototype
Medical Record System
[Steve Graham,
Digital Equipment Corporation was formerly listed first (alphabetically) in this section. According to material published by InterSystems corporation on 1/2/95, specifically the files dsmpr.txt, dsmqam.txt, and dsmlet.txt in their public FTP area, "Digital Equipment Corporation and InterSystems have formed a strategic partnership to expand the worldwide use of M Technology, particularly in the enterprise client/server arena. Simultaneously, InterSystems has acquired the DSM software product line, Digital's implementation of M."
"DSM will be marketed and sold by InterSystems' world-wide network of direct sales staff and distributors. In addition, Digital will continue to sell DSM in Japan and to certain customers under existing multi-year contracts."
dsmqam.txt lists the following contacts for more information:
Gerry Sunderland
Digital Equipment Corporation
151 Taylor Street TAY1-1/B6
Littleton, MA 01460-1407 USA
Telephone: 508-952-4119
Paul Schaut
InterSystems Corporation
One Memorial Drive
Cambridge, MA 02142 USA
Telephone: 617-621-0600
Fax: 617-494-1631
Internet: schaut@intersys.com
Digital Equipment Corporation: see InterSystems corporation
Extensao Informatica e Tecnologia
Rua da Gloria 290/10 andar
20241 Rio de Janeiro RJ, Brazil
Phone: +55-21-224-9321
Fax: +55-21-224-6044
Contact: Luiz Carlos Lobo Filho
Greystone Technology Corporation
100 Unicorn Park Drave
Woburn, MA 01801-6707, USA
Phone: +1 617-637-9000
Fax: +1 617-937-9022
Contact: Chris Neikam
International Business Machines
1701 North St.
Mail Drop G98G Bldg 017
Endicott, NY 13760, USA
Phone: +1 607-752-5179
Contact: Frank Samuel
Also: Offices is most countries
InterSystems Corporation
One Memorial Drive
Cambridge, MA 02142
Phone: +1 617-621-0600
Fax: +1 617-494-1631
Contact: Maureen Flaherty
Also: Offices in UK, Germany
MGlobal International, Inc.
P.O. Box 459
Orange, TX 77631
Phone: +1 409-883-8537
Fax: +1 409-883-3721
Contact: David Brown
MUMPS Systems Laboratory
39-15 Daikan-cho
Higashi-ku, Nagoya, Japan
Phone: +81-52-936-5660
Fax: +81-52-935-5435
Contact: Ichiro Wakai, M.D
Patterson, Gray and Associates
1701 E. Woodfield Road
Suite 850
Schaumburg, IL 60173, USA
Phone: +1 708-619-7500
Fax: +1 708-619-7530
Contact: Jeffrey Shirk
PFCS Corporation
Post Office Box 1806
Manchester, MO 63011-8806, USA
Phone: +1 314-230-8847
Fax: +1 314-230-9897
Contact: Harlan Stenn
VISO-DATA Computer AG
Rainergasse 1
A-1040 Vienna, Austria
Phone: +43-1-5055734
Fax: +43-1-5055734-34
Contact: Sandy R. Schorr
Membership for almost all MTAs includes:
MTA-North America also provides
M Technology Association
1738 Elton Road, Suite 205
Silver Spring, MD 20903-1725
USA
Phone: +1 301-431-4070
Fax: +1 301-431-0017
Home page: www.mtechnology.org
E-mail: mta@mtechnology.org
Publication: M Computing
MTA-Europe
c/o datika nv
keerbergsesteenweg 19
B-3150 Haacht
Belgium
phone: + 32 16 60 61 12
fax: + 32 16 60 61 17
E-mail: brothstein@compuserve.com
Web page: http://www.mta-europe.org
There are official MTAs and MUGs associated with MTA-Europe in Belgium, the Netherlands and Finland. Spain and Italy have local groups who are not officially associated with MTA-Europe. And of course, UK+Ireland and Germany have there own, realtively large groups, which are no longer affiliated with MTA-E.
There are also reported MTAs in Brazil, Bulgaria, China, Czech/Slovak Republics, Germany, Ireland, Israel, Italy, Japan, and Russia. Confirmation would be appreciated.
Please contact either of the above addresses for current information.
Baltimore-Washington MUG Contact: Susan Schluederberg The Connections Group, Ltd. 1100 Sunsett Drive Bel Air, MD 21014 Phone #: 410-838-6062 | COSTAR Users' Group Contact: COSTAR Users' Group 23715 W. Malibu Road, Suite 246 Malibu, CA 90265 Phone #: 310-456-9322 or 810-869-6301 |
Chicago Area LUG Contact: John Campbell on BBS Phone #: 312-929-6793 | DECUS MUMPS SIG Contact: Mitch Bell 200 Rector Place, #9P New York, NY 10280 Phone #: 212-657-3321 |
Central Florida MUG (Orlando-Tampa) 213 East Bay Street Winter Gardens, FL 34787 Contact: Mike Minor or Mark Gerszewski Phone #: 407-656-4990 or 813-978-9181 | Delaware Valley MUG Contact: D-V MUG Coordinator P.O. Box 323 Reading, PA 19607-0323 Phone: 215-748-2145 |
MUMPS of Georgia (MGA) 8351 Roswell Road Suite 221 Atlanta, Georgia 30350 Secretary's phone: (770) 968-3715 e-mail and web-site | LA MUG (Los Angeles) Make suggestions for topics/mtg.times Contact: Steve Atlas 5408 Rozie Avenue Woodland Hills, CA 91367 Phone #: 818-883-1206 |
Minnesota M Users' Group (Minneapolis-St. Paul) Contact: Chris Hawkins P.O. Box 14486 Minneapolis, MN 55414 Phone #: 612-627-6166 | New England MUG (Boston) Contact: Gardner Trask 508-927-7637 7 Galloupe Avenue Beverly, MA. 01915 |
Pacific Northwest MUG (Seattle) Contact: Arden Forrey Health Info. Admin. Program Dept. of Health Services School of Public Health and Community Medicine 1107 NE 45th St., #355 Seattle, WA 98105 Phone #: 206-543-8810 | Pittsburgh Regional MUG Contact: Valerie Harvey Computer Information Systems Robert Morris College 600 5th Avenue Pittsburgh, PA 15219-3099 Phone #: 412-262-8467 |
San Francisco Area MUG Contact: Julie Dijailia 51 Ridgewood Avenue San Francisco, CA 94112 Phone #: 415-262-8467 | Southwest MUG (Dallas-Fort Worth) Contact: Sidney E. Dane 4070 Walnut Lane Midlothian, Texas 76065 Phone +1 (817) 652-6194 Home Page |
Sunshine MUG (Southern Florida) Contact: Mark Fedora Phone #: 305-882-5319 Eastern Financial Credit Union 700 South Poinciana Blvd. Miami Springs, FL 33166 | Tri-State LUG (New York) Contact: Mitch Bell 200 Rector Place, #9P New York, NY 10280 Phone #: 212-657-3321 |
All of the following opinions can and have been supported:
I thought the official name of the language was M too, but this is not the case. The primary name for the language is still MUMPS. The ANSI standard refers to the language as MUMPS with M as an alternate name. The M Technology Association decided to use M as the primary _reference_ to the language MUMPS.
Well, let's try using 'M' instead of MUMPS for a start, before any XJ-11 people start flaming.
MUMPS is a language that goes by many names. Since a number of years, there has been a strong movement to change the name of the language to something else than MUMPS, countered by an equally strong movement to keep the name as is was.
The first official request to change the name of the language to "M" was in 1980, when Terry Ragon (now president of InterSystems) wrote a letter to the MUMPS Development Committee, requesting this change. At that moment in time, it was decided to keep the name MUMPS, but the movement to change the name did not disappear.
Over the years, there has been a number of informal requests to change the name of the language, but, oddly, there never was a formal proposal to do this before the MUMPS Development Committee (the only body that can change the name of the language).
The only thing that happened officially was that the nickname "M" became accepted as an alternate name. The language is still officially called MUMPS. Other official designations are ANSI X11.1 (1990) and ISO 11756 (1991).
Several of the user's groups have adopted the nickname, and changed their name to reflect that adoption, so we now have a MTA (USA), MTA-Japan, MTA-Europe, but Germany uses MUG-Deutschland (M Users Group) and Soyuz-DIAMS in Russia.
The most recent formal resolution that was passed by the MUMPS Development Committee regarding the name was to use the nickname throughout the document that is currently being circulated through the canvass process as the new draft ANSI standard. Evidently, this strongly promotes the use of the nickname over the 'real' name, but it still doesn't change the name of the language.
Maybe one day, someone will submit a formal proposal to the MUMPS Development Committee, but until such a proposal is submitted and favorably voted upon, "M" will remain a (well accepted) nickname for MUMPS.
Data types: one universal datatype, interpreted/converted to string, integer, or floating-point number as context requires. Like Visual BASIC "variant" type.
Booleans: In IF statements and other conditionals, any nonzero value is treated as True. a<b yields 1 if a is less than b, 0 otherwise.
Declarations: none. Everything dynamically created on first reference.
Lines: important syntactic entities. Multiple statements per line are idiomatic. Scope of IF and FOR is "remainder of current line."
Case sensitivity: Commands and intrinsic functions are case-insensitive. Variable names and labels are case-sensitive. No specified meaning for upper vs. lower-case and no widely accepted conventions. Percent sign (%) is legal as first character of variables and labels.
Postconditionals: 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. Provides a conditional whose scope is less than the full line.
Arrays: created dynamically, stored sparsely as B-trees, any number of subscripts, subscripts can be strings or integers. Always automatically stored in sorted order. $ORDER and $QUERY functions allow traversal.
for I=10000:1:12345 set SQTABLE(I)=I*I
set ADDRESS("Smith","Daniel")="dpbsmith@world.std.com"
Local arrays: names not beginning with caret; stored in process space; private to your process; expire when process terminates; available storage depends on partition size but is typically small (32K)
Global arrays: ^ABC, ^DEF. Stored on disk, available to all processes, persist when process terminates. Very large globals (hundreds of megabytes) are practical and efficient. This is M's main "database" mechanism. Used instead of files for internal, machine-readable recordkeeping.
Indirection: in many contexts, @VBL can be used and effectively substitutes the contents of VBL into the statement. SET XYZ="ABC" SET @XYZ=123 sets the variable ABC to 123. SET SUBROU="REPORT" DO @SUBROU performs the subroutine named REPORT. Operational equivalent of "pointers" in other languages.
Piece function: Treats variables as broken into pieces by a separator.
$PIECE(STRINGVAR,"^",3) means the "third caret-separated piece of STRINGVAR." Can appear as an assignment target. After
Order function:
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)
The argumentless For iterates until stopped by the Quit. Prints a table of I and STUFF(I) where I is successively 6, 10, and 15.
Commands: may be abbreviated to one letter, case-insensitive.
DO XYZ | call subroutine at label XYZ |
DO PQR(arg1,arg2,arg3) | call with parameter passing |
ELSE stmnt1 stmnt2 stmnt3 | opposite of last IF |
FOR stmnt1 stmnt2 stmnt3 | repeat until a QUIT breaks you out |
FOR i=1:1:100 stmnt1 ... | iteration, i=1, 2, 3, ... 100 |
GOTO | yes, there is one |
IF cnd stmnt1 stmnt2 stmnt3 | conditionally execute rest of line |
KILL vbl | return vbl to "undefined" state |
NEW vbl1,vbl2,vbl3 | stack old values, create fresh "undefined" state. Pop on QUIT. |
QUIT | return from subroutine |
QUIT value | return from extrinsic function |
READ "Prompt:",X | on current I/O stream, first write "Prompt:", then read line into variable X |
SET a=22,name="Dan",(c,d)=0 | variable assignment |
USE 23 | switch I/O stream to device 23 |
WRITE !,"x=",x | output to current I/O stream. ! means new line |
XECUTE("set a=5 do xyz") | execute arbitrary data as M code |
+ - * / | sum, difference, product, quotient |
\ | integer division, 1234\10 yields 123 |
# | modulo |
_ | concatenation, "nice"_2_"use" --> "nice2use" |
& ! ' < > | and, or, not, less, greater, equal |
[ | string contains. "ABCD"["BC" --> 1 |
] | string lexically follows. "Z"]"A" --> 1 |
? | pattern match operator |
$DATA(V) | tests if a variable V is defined (has data) or not |
$ORDER, $QUERY | traverse arrays in sorted order |
$ORDER(A("abc")) | value V is the next subscript, following "abc", according to the M collating sequence, such that a(V) is defined |
$PIECE | see above |
$SELECT(c1:v1,c2:v2,1:v3) | if c1 is true yields v1, else if c2 is true yields v2, otherwise yields v3 |
$TEXT(FOO+3) | returns text of source code at line FOO+3 |
$ASCII, $CHAR | text-to-ASCII-code and inverse |
$EXTRACT(STRING,5,10) | characters 5 through 10 of STRING; may be assignment target |
$FIND(string,find,from) | substring search |
$FNUMBER | floating point formatting |
$LENGTH(string) | just what you think |
$RANDOM(100) | random # in range 0 to 99 inclusive |
$TRANSLATE("abcd","ab","AB") | character substitution; yields "ABcd" |
1 zsample ;dpb;09:18 PM 6 Aug 1994 2 3 ;Test the Stats routine: 4 ;Calculate 1000 points w. approx. Gaussian distribution, 5 ;then call Stats on the result 6 ;Execution time: 5 seconds with DTM on a 33 MHz 386DX 7 8 New Data,i,j,output 9 For i=1:1:1000 Set Data(i)=$$Normal 10 Do Stats("Data",.output) 11 Write !,output 12 Quit 13 14 ;---------------------------------------- 15 ;Based on Lewkowicz, "The Complete MUMPS," examples 9.15-9.17 16 ;Modified slightly: 17 ;Used argumentless Do instead of two If's for Num>1 block 18 ;Corrected calculation of the standard error 19 ;---------------------------------------- 20 21 Stats(Ref,Results) ; Calculate simple Statistics on Array nodes 22 New High,i,Low,Mean,Num,StdDev,StdErr,s,Sum,SumSQ,Var 23 Set High=-1E25,Low=1E25,(Sum,SumSQ,Num)=0,s="" 24 For Set s=$O(@Ref@(s)) Q:s="" Do StatsV(@Ref@(s)) 25 If 'Num Set Results="" Goto StatsX 26 Set Mean=Sum/Num 27 Set (StdDev,StdErr,Var)="" 28 If Num>1 Do 29 . Set Var=-Num*Mean*Mean+SumSQ/(Num-1) 30 . Set StdDev=$$SQroot(Var) 31 . Set StdErr=StdDev/$$SQroot(Num) 32 Set Results=Num_";"_Low_";"_High_";"_Mean 33 Set Results=Results_";"_Var_";"_StdDev_";"_StdErr 34 Goto StatsX 35 StatsV(Val) ;Process an individual value 36 Set Val=$$NumChk(Val) Quit:Val="" 37 Set Num=Num+1,Sum=Sum+Val,SumSQ=Val*Val+SumSQ 38 Set:Val[Lines 21-58 are from Examples 9.15, 9.17 and 9.18 of "The Complete MUMPS," by John Lewkowicz, ISBN 0-13-162141-6, 1989, Prentice-Hall, Englewood Cliff, New Jersey and are copyright 1989 by Prentice-Hall, Inc. Permission to use these examples has been solicited from Prentice-Hall, but no reply has been received. This Appendix may be modified or omitted in future versions if Prentice-Hall objects to its inclusion].High High=Val 39 Quit 40 StatsX Quit 41 42 SQroot(Num) ;Return the SQUARE ROOT of abs(Num) 43 New prec,Root Set Root=0 Goto SQrootX:Num=0 44 Set:Num<0 Num=-Num Set Root=$S(Num>1:Num\1,1:1/Num) 45 Set Root=$E(Root,1,$L(Root)+1\2) Set:Num'>1 Root=1/Root 46 For prec=1:1:6 Set Root=Num/Root+Root*.5 47 SQrootX Quit Root 48 49 NumChk(Data,Range,Dec) ;Check for valid NUMBER 50 Set Data=$TR(Data,"+ $,") 51 Goto NumChkE:Data'?.E1N.E,NumChkE:Data'?."-".N.".".N 52 If $D(Dec),Dec?1N.N g NumChkE:$L($P(Data,".",2))>Dec 53 Set:'$D(Range) Range="" Set:Range="" Range="-1E25:1E25" 54 If $P(Range,":")'="" Goto NumChkE:Data<$P(Range,":") 55 If $P(Range,":",2)'="" Goto NumChkE:Data>$P(Range,":",2) 56 Set Data=+Data Goto NumChkX 57 NumChkE Set Data="" 58 NumChkX Quit Data 59 ; 60 ;---------------------------------------- 61 ; 62 ;Part of demo/test code, Dan Smith, 8/26/94 63 Normal() ;Return random # with approximately Gaussian distribution 64 New i,x,n ;n=# iterations 65 Set x=0,n=3 ;Higher n = slower, better Gaussian approximation 66 ;$random(1201) has approx. mean=600, variance=120000 67 For i=1:1:n*n Set x=x+$random(1201)-600 68 Set x=x/(346.4101615*n) ;variance now 1 69 Quit x
Notes:
Line 8:
Command names: Command names in M are case-insensitive, and may either be spelled out in full or abbreviated to a single character. Thus, the NEW command could be written as "NEW" or "New" or "new" or "N" or "n". Lewkowicz consistently spells them out in full, with mixed case.
NEW command: This is not a declaration, but an executable command. In M, this is the way you effectively make a variable private to a subroutine. On entry to zsample, the variables Data, i, j, and output may or may not have values. The New command stacks the old identity of these variables, which now become undefined. zsample may freely use the variables. On Quit-ing from the subroutine, any values the subroutine established for them are discarded and the old values restored.
It is good practice to New the variables used for temporary storage within a subroutine, and some programmers do this systematically. Lewkowicz does it, and alphabetizes the order of the names in the New list to make maintenance easier.
Lines 8, 10, and 21: Passing an array reference as an argument. "Stats" is a subroutine which takes a parameter list. It is designed to work generally using any array, local or global, or array reference. The argument that is passed is a string; here, the string "Data", which names a local array. Within the subroutine, the "subscript indirection" mechanism is used; i.e. because Ref has been set equal to the string "Data", the expression @Ref@(s) refers to Data(s). If Ref were set to "^Permanent", the expression @Ref@(s) would refer to ^Permanent(s). Ref could also be set to an array subnode.
Line 28: An "argumentless DO." This structure causes the set of lines beginning with periods to be executed. Argumentless "DO's" can be nested. They stack and restore the value of $T. Using these tools it is possible to write nested "If-Else" structures that behave as expected.
If condition1 Do . If condition2 Do . . <code> ;executes if condition1 and 2 are both true . . <code> . . <code> . Else Do . . <code> ;executes if condition1 is true but not condition2 . . <code> . . <code> Else Do . <code> ;executes if condition1 is false . <code> . <code>
%DTC %DTC ; SF/XAK - DATE/TIME OPERATIONS ;1/16/92 11:36 AM ;;19.0;VA FileMan;;Jul 14, 1992 D I 'X1!'X2 S X="" Q S X=X1 D H S X1=%H,X=X2,X2=%Y+1 D H S X=X1-%H,%Y=%Y+1&X2 K %H,X1,X2 Q ; C S X=X1 Q:'X D H S %H=%H+X2 D YMD S:$P(X1,".",2) X=X_"."_$P(X1,".",2) K X1,X2 Q S S %=%#60/100+(%#3600\60)/100+(%\3600)/100 Q ; H I X<1410000 S %H=0,%Y=-1 Q S %Y=$E(X,1,3),%M=$E(X,4,5),%D=$E(X,6,7) S %T=$E(X_0,9,10)*60+$E(X_"000",11,12)*60+$E(X_"00000",13,14) TOH S %H=%M>2&'(%Y#4)+$P("^31^59^90^120^151^181^212^243^273^304^334","^",%M)+%D S %='%M!'%D,%Y=%Y-141,%H=%H+(%Y*365)+(%Y\4)-(%Y>59)+%,%Y=$S(%:-1,1:%H+4#7) K %M,%D,% Q ; DOW D H S Y=%Y K %H,%Y Q DW D H S Y=%Y,X=$P("SUN^MON^TUES^WEDNES^THURS^FRI^SATUR","^",Y+1)_"DAY" S:Y<0 X="" Q 7 S %=%H>21608+%H-.1,%Y=%\365.25+141,%=%#365.25\1 S %D=%+306#(%Y#4=0+365)#153#61#31+1,%M=%-%D\29+1 S X=%Y_"00"+%M_"00"+%D Q ; YX D YMD S Y=X_% G DD^%DT YMD D 7 S %=$P(%H,",",2) D S K %D,%M,%Y Q T F %=1:1 S Y=$E(X,%) Q:"+-"[Y G 1^%DT:$E("TODAY",%)'=Y S X=$E(X,%+1,99) G PM:Y="" I +X'=X D DMW S X=% G:'X 1^%DT PM S @("%H=$H"_Y_X) D TT G 1^%DT:%I(3)'?3N,D^%DT N F %=2:1 S Y=$E(X,%) Q:"+-"[Y G 1^%DT:$E("NOW",%)'=Y I Y="" S %H=$H G RT S X=$E(X,%+1,99) I X?1.N1"H" S X=X*3600,%H=$H,@("X=$P(%H,"","",2)"_Y_X),%=$S(X<0:-1,1:0)+(X\86400),X=X#86400,%H=$P(%H,",")+%_","_X G RT D DMW G 1^%DT:'% S @("%H=$H"_Y_%),%H=%H_","_$P($H,",",2) RT D TT S %=$P(%H,",",2) D S S %=X_% I %DT'["S" S %=+$E(%,1,12) Q:'$D(%(0)) S Y=% G E^%DT PF S %H=$H D YMD S %(9)=X,X=%DT["F"*2-1 I @("%I(1)*100+%I(2)"_$E("><",X+2)_"$E(%(9),4,7)") S %I(3)=%I(3)+X Q TT D 7 S %I(1)=%M,%I(2)=%D,%I(3)=%Y K %M,%D,%Y Q NOW S %H=$H,%H=$S($P(%H,",",2):%H,1:%H-1) D TT S %=$P(%H,",",2) D S S %=X_$S(%:%,1:.24) Q DMW S %=$S(X?1.N1"D":+X,X?1.N1"W":X*7,X?1.N1"M":X*30,+X=X:X,1:0) Q COMMA ; S %D=X<0 S:%D X=-X S %=$S($D(X2):+X2,1:2),X=$J(X,1,%),%=$L(X)-3-$E(23456789,%),%L=$S($D(X3):X3,1:12) F %=%:-3 Q:$E(X,%)="" S X=$E(X,1,%)_","_$E(X,%+1,99) S:$D(X2) X=$E("$",X2["$")_X S X=$J($E("(",%D)_X_$E(")",%D+1),%L) K %,%D,%L Q HELP S DDH=$S($D(DDH):DDH,1:0),A1="Examples of Valid Dates:" D % S A1=" JAN 20 1957 or 20 JAN 57 or 1/20/57"_$S(%DT'["N":" or 012057",1:"") D % S A1=" T (for TODAY), T+1 (for TOMORROW), T+2, T+7, etc." D % S A1=" T-1 (for YESTERDAY), T-3W (for 3 WEEKS AGO), etc." D % S A1="If the year is omitted, the computer "_$S(%DT["P":"assumes a date in the PAST.",1:"uses the CURRENT YEAR.") D % I %DT'["X" S A1="You may omit the precise day, as: JAN, 1957" D % I %DT'["T",%DT'["R" G 0 S A1="If the date is omitted, the current date is assumed." D % S A1="Follow the date with a time, such as JAN 20@10, T@10AM, 10:30, etc." D % S A1="You may enter a time, such as NOON, MIDNIGHT or NOW." D % I %DT["S" S A1="Seconds may be entered as 10:30:30 or 103030AM." D % I %DT["R" S A1="Time is REQUIRED in this response." D % 0 Q:'$D(%DT(0)) S A1=" " D % S A1="Enter a date which is "_$S(%DT(0)["-":"less",1:"greater")_" than or equal to " D % S Y=$S(%DT(0)["-":$P(%DT(0),"-",2),1:%DT(0)) D DD^%DT:Y'["NOW" I '$D(DDS) W Y,"." K A1 Q S DDH(DDH,"T")=DDH(DDH,"T")_Y_"." K A1 Q ; % I '$D(DDS) W !," ",A1 Q S DDH=DDH+1,DDH(DDH,"T")=" "_A1 Q[NOTE: this example is extracted from VA FileMan Version 19.0. There is no copyright notice in the text of the source code or any of the accompanying documents; FMANPROG.TXT and FMANUSER.TXT each specifically contain the statement "VA FileMan is a public domain software package that is developed and maintained by the Department of Veterans Affairs." I therefore believe no permission is required to reproduce this passage.-- [Daniel P.B. Smith]
1) The "New" command is not used; all variables are treated as universal in scope.
2) There is no use of the DO parameter passing mechanism, and no use of extrinsic functions. Information is passed in and out of subroutines by setting variables.
Practices 1 and 2 make it difficult to understand which variables are used for input, which for output, and which are for temporary local processing (and could just as well be private to the routine). They also make it difficult to add new code to a project because of the possibility of variable name conflicts.
3) M commands are uniformly abbreviated to a single character.
4) Variable names are short, frequently a single character. The single percent sign is used as a variable name, and also as an array.
5) Labels are short. Some label consist of single characters or even single numerals. The percent sign is used as a label.
Practices 3, 4, and 5 make the code difficult to read for novices, but are much less of a problem for experienced M programmers.
It can be argued practice 3 is beneficial because it aids in visual identification of "argumentless" commands. In M, "argumentless" commands ("Do", "Quit", "For") are semantically different from same commands with arguments ("Do REPORT","Quit retvalue", "For I=1:1:100"). Unfortunately, the M white space rules say that a command and its arguments must be separated by precisely one space, and an "argumentless" command is identified by being followed by two or more spaces.
6) Some lines are considerably in excess of 80 characters and wrap when displayed or printed.
Line scope is significant in M; "For" and "If" operate on the rest of the current line. Multistatement lines are natural to M, and M permits lines to be up to 255 characters long. When the natural logic of a statement calls for more than eighty characters, the programmer can choose to write a long line, or rework the logic to avoid this. The argumentless DO and block structure make this easy to do; for example
I X?1.N1"H" S X=X*3600,%H=$H,@("X=$P(%H,"","",2)"_Y_X),%=$S(X<0:-
1,1:0)+(X\86400),X=X#86400,%H=$P(%H,",")+%_","_X G RT
can be rewritten as
If X?1.N1"H" Do Go RT . Set X=X*3600,%H=$H,@("X=$P(%H,"","",2)"_Y_X) . Set %=$S(X<0:1,1:0)+(X\86400) . Set X=X#86400,%H=$P(%H,",")+%_","_XHowever, some programmers see no need for this, and just as there are syntax purists, there are efficiency purists who will point out that the rewritten version must take at least some additional execution time and must consume at least some additional program space.
7) There are eleven goto (G) statements. Note that six of them transfer control to labels in routines other than %DTC itself.
8) The only uses of comments are the two heading lines, and in blank lines used to separate subroutines for readability.
(Copyright (c) 1993 Personal Systems, the monthly journal of the San Diego Computer Society; all rights reserved. Permission to reproduce this article is granted to other non-profit organizations such as computer user groups for non-commercial use as long as credit to the author and group is given and provided a copy of the newsletter is sent to us at: San Diego Computer Society, ATTN: Editor, Personal Systems; 5694 Mission Center Road; Suite 602, Box 350; San Diego, CA 92108)
What is MUMPS? Is it a programming language that thinks it is a database, or is it a database that thinks it is a programming language? Actually, it is both. And it is an ANSI Standard Language to boot.
What does that mean to anyone who is knocking out little applications on a home PC or Apple? Well, the nice thing about an ANSI Standard language is that the code you write on the Apple in standard MUMPS transports nicely to the IBM PC without any change. And if that other system is a mainframe, like a Vax or a large IBM system, your application will work there also.
Where did MUMPS come from and what does MUMPS stand for? MUMPS was originally developed in the middle 60's on a National Institute of Health Grant at Massachusetts General Hospital. It was originally designed to run on a large machine (at that time...) 4K of memory (that is 4,000 bytes, not megabytes) and 100 megabyte disk storage.
If it was written by a hospital, does it only do hospital problems? It was designed to solve the problem of tracking patient data. How does patient data differ from auto supply inventory or a check book? A patient can have many attributes that describe each encounter. For instance, suppose a patient gets admitted to a hospital with a traditional square record database, and is known to have six allergies, but there is only room for five allergies in the record.
Which allergy will you elect not to record? If this patient dies because of that one allergy that you did not record, your hospital may change ownership in settling his estate. For the majority of patients, the space reserved for the five allergies will not be used and is wasted space. That means that your hospital will be buying more disk space a lot sooner.
In the MUMPS environment, the database disk space is not allocated until it is needed (run-time). This means that the patient record expands to fit the amount of data required for that patient. If the space is not used, it is not allocated. If you have 12 patients in your database, you have only the space for these 12 records allocated.
In most traditional databases, you must allocate as many records as you
expect before the first record is allocated. With MUMPS, many databases can
be described but they will not take up any space until actual records are
created. There is no theoretic maximum number of records that a specific
database can contain. It is only bound by the actual amount of disk space
that is available to be assigned. Talk about getting 10 pounds in a 5 pound
sack.
Many database environments already exist for the PC, why should you be
interested in another? MUMPS is unlike most other databases in that it is
also a special type of programming language called an interpreter. OK, we
hear the moans from the BASIC programming crowd. And did you think you got
rid of interpreters when BASIC compilers came out. Well, you didn't.
Interpreters don't have to be slow and most database environments actually
do go interpretive when they service user queries. Anyway, even if
the MUMPS interpreter was slow (which it isn't) the levels of run-time
and error-time support is worth the difference.
When a MUMPS application stops for some reason, the symbol table remains
intact at the line of code being executed when the error occurred.
In the event of an error, control may be passed to another routine to capture
the conditions of the failure or even attempt to recover from the error
condition. Traditionally, MUMPS database applications have a short
mean-time-to-repair (MTTR) of just a few minutes and a long up-time record.
Also, in many cases, the application that blew up can be re-started from
where it left off.
What does MUMPS look like?
MUMPS has only a single data type, strings (of characters). This makes the
conversion from one data type to another easier.
Most MUMPS commands may be abbreviated to a single character. Or spell them
out if you choose. Code generation is quick.
MUMPS commands can be easily combined to form more complex and complicated
structures. Each line of code is a block of code.
MUMPS makes little distinction between data and code. Code can be created
and executed from a database or the symbol table at run-time. Data can be
stored in a routine and accessed at run-time.
MUMPS is a sparse matrix array processor. This means that arrays are
allocated at run-time; the arrays may be created in any order. Array
element 1000000 can be created and then element 2 can be created and yet the
array only has 2 elements in it.
Because there are only string data types, the subscripts of a MUMPS array are
strings. What a concept! You can subscript an array by "APPLES" and
"ORANGES", and "AVOCADOS". Now for the good news, when those subscripts are
created, they are sorted alphabetically. MUMPS means never having to say
you're sorting.
The language is still growing. Every ANSI Standard has a built-in sunset of
seven years. That means that if nothing is done with a standard in seven
years, it ceases to be a standard. Well, MUMPS has had an ANSI standard for
1977, 1984, 1990, and the MUMPS Development Committee is attempting to
release a 1993 standard. Additional standards for WINDOWING, Networking,
and Transaction Processing are currently in process.
MUMPS is transportable. It doesn't matter if MUMPS code is running under
MS-DOS, Windows NT, UNIX, VMS, VM, or nearly any operating system you might
mention, the code and database will still run. In fact, in some
implementations MUMPS is also the operating system.
Who uses MUMPS? Probably a lot more than you might think. How about
the Veteran's Administration. Well, the VA did such a good job of
putting a Fourth Generation Language together in MUMPS that the Indian
Health Service decided to use it, then the U.S. Public Health
Service, and finally the Department of Defense for the Army, Navy, and
Air Force hospitals and clinics around the world. By the way, the
VA's 4GL, File Manager is in the public domain. If you can find a
source, you can get it free! Another advantage is that the package is
distributed as source code because MUMPS is an interpreter.
Is it just for hospitals? No, MUMPS is an excellent choice for nearly any database operation, especially if not every aspect of the situation is known. MUMPS is being used by banks and credit unions. Do you travel on airlines? You have probably been scheduled on a MUMPS system. All of the postage stamp sales for the U.S. Postal Service are tallied on a MUMPS system each evening. Auto parts houses keep track of their inventories with MUMPS systems. Language translators have been implemented in MUMPS and it also works well with artificial intelligence projects.
If MUMPS was developed here, is it only used in this country? The national health services of Finland and England, as well as a few other countries are currently using MUMPS. Ever gamble in the gambling houses in London? They use MUMPS to track high rollers from one gambling house to the next. The British Stock Exchange also uses MUMPS. The largest department store chain in Spain uses MUMPS. The Russians acquired a copy of MUMPS and modified it to run their national health services and track containerized freight.
If MUMPS is so good, why haven't I heard of it? This is an interesting point. The computer industry lives on some very simple rules, 1) sell products with follow-on (things that need other things to work properly or better) and 2) sell items that make it difficult to migrate to another vendor's hardware or software (also known as product loyalty). MUMPS provides the programming language, the database, the screen handler, and soon, windows of any platform that will have a MUMPS interpreter (which is just about any platform). MUMPS code is extremely transportable. Standard MUMPS code works fine on whatever platform you run it on.
When a MUMPS implementation is installed to replace an existing traditional system, usually there are sufficient resources for the MUMPS environment, with plenty of resources left for future expansion.
Alright, I'm sold. Where can I get MUMPS for my system? Now for some good news, there is an evaluation version of MUMPS for MS-DOS that is free, especially if you happen to be a student. The vendor only asks that you register your use of the product.
By the way, there is extensive documentation available for this product. There is a MUMPS Users' Group (now called the M Technology Association) which can be contacted at:
MUMPS Users' Group of North America
1738 Elton Road, Suite 205
Silver Spring, MD 20903
Phone: (301)-431-4070
Fax: (301)-431-0017
(Author Profile: Chris Richardson is a Software Engineer with Science
Applications International Corporation in San Diego and is a member of
the MUMPS Development Committee, the ANSI Standards writing
organization for the MUMPS language. He has worked for NASA, the U.S.
Public Health Service, the U.S. Navy, Army, and the Air Force as
well as Computer Sciences Corporation and Singer-Link in Houston. He
has taught Real-time FORTRAN and MUMPS to professionals in the
industry and government).
Older submissions may be included if they are of a unique, or highly informative nature.
Source: Newsgroups: comp.lang.mumps
Date: Mon, 7 Oct 1996 09:06:20 -0500
Try looking at http://www.spr.com/library/langtbl.htm. It contains a language ranking, based on the amount of effort required to code a function point and M ranks very well.
Ellis A. Bauman: ellis.bauman@uwmf.wisc.edu
Ben Bishop: aci@shore.net
Dennis J. Brevik: dbrevik@ix.netcom.com
Steve Clay: sbc@pobox.com
Etienne Cherdlu: gz64@cityscape.co.uk
Floyd Dennis: fbdennis@mindspring.com
Jon Diamond: Jdiamond@btinternet.com
Rod Dorman: rodd@panix.com
John D. Godfrey: Godfrey@msmail.vet.cornell.edu
Gavin Greig: ggreig@mcs.dundee.ac.uk
Russell Haddleton: rfh2y@uvacs.cs.Virginia.EDU
Brett Hunt: BrettH@Micronetics.com
Lev Jacob: lev@TRENDLINE.CO.IL
Scott P. Jones: scott@intersys.com
John E. Kemker, III: kemker.j@atlanta.va.gov
Mark Komarinski: komarimf@craft.camp.clarkson.edu
Monika Kratzmann: monika@INTERSYS.COM
Jeff Loeb: JEFFREY.L.LOEB@cpmx.saic.com
Keith F. Lynch: kfl@access.digex.net
Jim McIntosh: jim@american.edu
Ed de Moel: demoel@jacquardsystems.com
Steve J. Morris: sjm2@shore.net
Kevin O'Gorman: kevin@kosman.uucp
Paul Perrin: Admin@admatic.com
Doug Preiser: preiser@cancer.unm.edu
Harold Pritchett: harold@UGA.CC.UGA.EDU
Aaron Seidman: seidman@world.std.com
Kate Schell: cschell@jacquardsystems.com, http://jacquardsystems.com
Tilman Schmidt: ts@gb1.sema.de
Arthur B. Smith: ART@vets.vetmed.missouri.edu
Daniel P.B. Smith: dpbsmith@world.std.com
Richard J. Tomlinson: Richard@rtsysgen.demon.co.uk
Gardner Trask: trask@shore.net
David Whitten: whitten@netcom.com
Changes since version 1.6: 1 Aug 1997
Changes since version 1.5: 1 May 1997