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

You must be logged in to reply to this topic.

Blue Elm Eventts

December 2018
S M T W T F S
« Aug    
 1
2345678
9101112131415
16171819202122
23242526272829
3031