M[UMPS] Commands

M[ERGE]

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

Initialize the arrays ^A and ^B as:

KILL ^A,^B
SET ^A(1,2)="First"
SET ^A(1,2,4)="Second"
SET ^B(5,6,7)="Third"
SET ^B(5,6,8)="Fourth"
SET ^B(5,6,7,8,1)="Fifth"
SET ^B(5,6,7,8,9)="Sixth"

The command MERGE ^A(1,2)=^B(5,6,7) will cause the contents of ^A to be modified into:
^A(1,2)="Third"
^A(1,2,4)="Second"
^A(1,2,8,1)="Fifth"
^A(1,2,8,9)="Sixth"

A subsequent MERGE ^A(1,2,3)=^B(5,6,7,8) will cause the contents of ^A to be modified into:

^A(1,2)="Third"
^A(1,2,3,1)="Sixth"
^A(1,2,3,9)="Fifth"
^A(1,2,4)="Second"
^A(1,2,8,1)="Fifth"
^A(1,2,8,9)="Sixth"

Note that no node ^A(1,2,3) is created.

KILL TMP
SET TMP("GLOBAL")="TESTGENV"
SET TMP("ROUTINE")="TESTRENV"
SET TMP("LOCK")="TESTGENV"
...
MERGE ^$JOB($JOB)=TMP

Set up the parameters for working in a different environment, and activate those parameters in a single command.

Examples with naked references:

MERGE TO=FROM
SET ^ABC(1,2)="reset naked indicator"
; Naked indicator is now ^ABC(1,
MERGE ^(3,4)=^(5,6)

; Pretend SET ^(3,4)=^(5,6) is executed
; 1. fetch ^(5,6) = ^ABC(1,5,6)
; 2. store ^(3,4) = ^ABC(1,5,3,4)
; Naked indicator is now: ^ABC(1,5,3,


This document is © Ed de Moel, 1995-2005.
It is part of a book by Ed de Moel that is published under the title "M[UMPS] by Example" (ISBN 0-918118-42-5).
Printed copies of the book are no longer available.

This document describes the various commands that are defined in the M[UMPS] language standard (ANSI X11.1, ISO 11756).

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

In this document, information is included that will appear in future standards.
The MDC cannot guarantee that these 'next' standards will indeed appear.