MAGIC OpenGate query that displays a list of MEDITECH databases, segments and IP addresses per MAGIC directory

Home/Support/OpenGate/MAGIC OpenGate query that displays a list of MEDITECH databases, segments and IP addresses per MAGIC directory

Home Forums Support OpenGate MAGIC OpenGate query that displays a list of MEDITECH databases, segments and IP addresses per MAGIC directory

Tagged: , ,

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Shawn Kenny
    Keymaster
    Post count: 26

    When querying MEDITECH MAGIC data with OpenGate, it is most efficient to connect to the segment(MAIGC IP) the data you are querying lives on. If you are not sure where the MEDITECH application databases reside the following query will map this out for you. In order to run this query in OpenGate make sure the MIS schema is loaded.

    INITIALIZE 
    {
    O(:S,$util.files),""^M,
    DO{+($MACHINE[M],N)^M M^/NODE[N]}
    }
    
    select 
    MIS.APPL.database AS [database],
    MIS.APPL.database.segment AS [segment],
    :M[/NODE[$MAC[MIS.APPL.database.segment]#".0"_"N"]]IP|1 AS [ip],
    MIS.APPL.database.directory AS [directory]
    FROM MIS.APPL.main
    
    EXIT {
    C(:U),K(/NODE)
    }
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Blue Elm Eventts

October 2019
S M T W T F S
« Aug    
 12345
6789101112
13141516171819
20212223242526
2728293031