Article
· Aug 10, 2023 2m read

How to compare multiple globals and routines in two databases

InterSystems FAQ rubric

※Use this method if you want to compare databases that have been replicated using mirroring, shadowing, or some other mechanism.

You can use the DATACHECK utility to compare global variables. Please refer to the document below.
Overview of DataCheck [IRIS]

***

Routine comparisons use the system routine %RCMP or the Management Portal.

Below is how to use it in the Management Portal.

 For example, suppose the following routine is in the USER namespace.

test() public{
 quit "hello"
}

Assume the following routine is in the USER2 namespace.

test() public{
 quit "Hello"
}

Below is the result of running %RCOM in a terminal connected to the USER namespace.

* Write the routine name in Compare: and the routine name to be compared in with:
  To specify a routine in another namespace, specify |"namespace name"|routine name.MAC.

USER>do ^%RCMP
 
Compare: comptest.mac                   with: |"USER2"|comptest.mac
Compare:  // [Memo] If there is nothing to compare, press Enter
 
Ignore Comment Differences? No => No
Ignore Leading White Space? No => No
 
Display Results on
Device: c:\temp\comp.txt   // [Memo] File output when file name is specified 
Parameters? ("WNS") =>
comptest.MAC                  |"USER2"|comptest.MAC
*******************************************************************************
USER>

The comparison results are as follows.

                   Routine Comparison   02 Feb 2021   2:31 PM
                 From directory: c:\intersystems\iris\mgr\user\

comptest.MAC                  |"USER2"|comptest.MAC  
*******************************************************************************
comptest.MAC
 +2         quit "hello"
...................
|"USER2"|comptest.MAC
 +2         quit "Hello"
******************************************************************************

Discussion (0)0
Log in or sign up to continue