Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples
Left Hand Pointer

OPEN

M[UMPS] by Example

Right Hand Pointer

Introduced in the 1977 ANSI M[UMPS] language standard.

Clarifications (no change intended) in a future M[UMPS] language standard:

When a device is currently "OPEN", and another OPEN command is issued by the process that "owns" the device, and in the later OPEN command the device parameters are different than in the original one, the system will behave as if the device is virtually CLOSEd and then re-OPENed with the new parameters. If the new parameters are incompatible with the device, error processing will occur "as usual".

Any keywords in the argument of the command are processed in strict left-to-right order. When multiple equivalent parameters are encountered, the last occurrence processed will define the action(s) to be taken.

For examples, see the examples with the Use command.

Additions in a future M[UMPS] language standard.

The ability to specify "user-defined" mnemonicspaces is added. It will be possible to specify to an implementation to use entries in a specific routine (let's call it USER for the purpose of this discussion) for the processing of the commands Open, Use and Close and the various controlmnemonics for specific combinations of device and mnemonicspace.

When this feature is active, the controlmnemonic /ABC(P1,P2) will be executed as Do ABC^USER(P1,P2), and the command Open device:(PARAM1:KEY2=VALUE2) will be executed as:

Do
. New X,Y
. Set (X,Y)=2 ; Number of deviceparameters
. Set X(1)="PARAM1" ; First deviceparameter
. Set X(2)="KEY2",Y(2)=VALUE2
. Do %OPEN^USER(device,.X,.Y,"")
. Quit

The name of a device may contain an environment specification
Open |"LONDON"|MTA47

The addition of a binding to TCP/IP socket devices includes a number of new deviceparameters.

The deviceparameters are: ATTACH, CONNECT, DELIMITER, IOERROR, LISTEN, DETACH and SOCKET. For examples, see the Use command.

For a program that parses a programming language, it is hard to see the difference between:
...:(abc=xyz):...
and
...:(FILENAME="C:\temp\ABC.TMP"):...
In the former example, the text between the parentheses should be an expression that happens to return a boolean value, whereas in the latter example, the text between the parentheses could be a "keyword equals value" combination that has a meaning in certain mnemonicspaces.

In order to make it easier to indicate this difference, the option to precede a devicekeyword with a slash has been introduced. This would make the latter example look like:
...:(/FILENAME="C:\temp\ABC.TMP"):...

Examples with naked references:

Open DEVICE
Set ^ABC(1,2)="reset naked indicator"
; naked indicator is now ^ABC(1,
Open ^(3,4)

; naked indicator is now: ^ABC(1,3,
; Actual reference is: ^ABC(1,3,4)

Open DEVICE:PARAMETERS
Set ^ABC(1,2)="reset naked indicator"
; naked indicator is now ^ABC(1,
Open ^(3,4):^(5,6)

; 1. fetch ^(3,4) = ^ABC(1,3,4)
; 2. fetch ^(5,6) = ^ABC(1,3,5,6)
; naked indicator is now: ^ABC(1,3,5,

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2017 MUMPS Development Committee;
Copyright © Examples: 1995-2017 Ed de Moel;
Copyright © Annotations: 2003-2017 Jacquard Systems Research.

The information in this page is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 13-Sep-2014, 17:03:29 .

For comments, contact Ed de Moel (demoel@jacquardsystems.com)