How to get DB and global location information?

I need to write a script to answer a couple of fairly simple questions:

1) What is the current routine DB (name and location) for this namespace?

2) What is the current data DB (name and location) for this namespace?

3) Is global ^ABC mapped to a different location than the default data DB?

Can anyone point me to some system APIs that would allow me to answer these questions?

Thanks!

Ben

  • 0
  • 0
  • 65
  • 0
  • 2

Answers

Hi,

To get information about a namespace, You may use this code :

(run it only in %sys" namespace) 

Properties variable is passed by ref (i.e. it has a point at the beginning)

%SYS>S Status=##Class(Config.Namespaces).Get("user", .Properties)

%SYS>zw Properties
Properties("Globals")="USER"
Properties("Library")="CACHELIB"
Properties("Routines")="USER"
Properties("SysGlobals")="CACHESYS"
Properties("SysRoutines")="CACHESYS"
Properties("TempGlobals")="CACHETEMP"