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: 27

    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)
    }
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
    • This topic was modified 3 years, 6 months ago by  Shawn Kenny.
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

Blue Elm Eventts

April 2019
S M T W T F S
« Aug    
 123456
78910111213
14151617181920
21222324252627
282930