11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Caché</strong> <strong>ObjectScript</strong> CommandsMERGEMerges global nodes or subtrees from source into destination.MERGE:pc mergeargument,...M:pc mergeargument,...where mergeargument is:destination=sourceArgumentspcdestination and sourceOptional — A postconditional expression.Local variables, process-private globals, or globals to bemerged.DescriptionMERGE destination=source copies source into destination and all descendants of sourceinto descendants of destination. It does not modify source, or kill any nodes in destination.MERGE simplifies the copying of a sub-tree (multiple subscripts) of a variable to anothervariable. Either variable can be a local variable, a process-private global, or a global. A subtreeis all variables that are descendants of a specified variable. MERGE offers a one-commandalternative to the current technique for doing sub-tree copy: a series of SET commands with$ORDER references.MERGE returns a error if the source and destination have a parent-childrelationship.The MERGE command can take longer than most other <strong>Caché</strong> <strong>ObjectScript</strong> commands toexecute. As a result, it is more prone to interruption. The effect of interruption is implementation-specific.Under <strong>Caché</strong>, an interruption may cause an unpredictable subset of the sourceto have been copied to the destination subtree.ArgumentspcAn optional postconditional expression. <strong>Caché</strong> executes the MERGE command if the postconditionalexpression is true (evaluates to a non-zero numeric value). <strong>Caché</strong> does not execute90 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!