%SYS
Namespace Class Reference
Inheritance diagram for Namespace:
Collaboration diagram for Namespace:

Static Public Member Functions

 GetAllNSInfo (_.Library.String Namespace, _.Library.String Info, _.Library.Boolean DontConnect)
 Return information about a namespaces default global and routine database. More...
 
_.Library.String GetGlobalDest (_.Library.String Namespace, _.Library.String Global, _.Library.String Subscript)
 Returns the system^directory where ^[Namespace]Global(Subscript) is mapped to. More...
 
 GetNSInfo (_.Library.String Namespace, _.Library.String Info, _.Library.Boolean DontConnect)
 Return information about a namespaces default global database. More...
 
_.Library.String GetPackageDest (_.Library.String Namespace, _.Library.String Package)
 Returns the system^directory where Package is mapped to in this Namespace. More...
 
_.Library.String GetRoutineDest (_.Library.String Namespace, _.Library.String Routine, _.Library.String Type)
 Returns the system^directory where Routine is mapped to in this Namespace. More...
 
_.Library.Status ListAll (array, _.Library.Boolean ConvertImplicit)
 The ListAll method quickly returns a list of all the. More...
 

Member Function Documentation

◆ GetAllNSInfo()

GetAllNSInfo ( _.Library.String  Namespace,
_.Library.String  Info,
_.Library.Boolean  DontConnect 
)
static

Return information about a namespaces default global and routine database.

On Input: Namespace - Namespace to obtain information about. Can be either a real namespace or an implied namespace DontConnect - If the namespace's default database is a remote database mounted across ECP, then if set to 1, and the remote database is not mounted, we will not try to mount it (default = 0).

Returns an array of information about the default global and routine databases. Info("GlobalDB","System") - name of system default global directory resides on. Info("GlobalDB","Directory") - Name of default global directory. Info("GlobalDB","Resource") - Name of resource attached to the directory. Info("GlobalDB","ReadOnly") - 0/1 is the database mounted read only. Info("GlobalDB","Mounted") - 0/1 is the database mounted. Info("GlobalDB","Status") - 1 = Success, Status if any kind of error. Info("RoutineDB","System") - name of system default routine directory resides on. Info("RoutineDB","Directory") - Name of default routine directory. Info("RoutineDB","Resource") - Name of resource attached to the directory. Info("RoutineDB","ReadOnly") - 0/1 is the database mounted read only. Info("RoutineDB","Mounted") - 0/1 is the database mounted. Info("RoutineDB","Status") - 1 = Success, Status if any kind of error.

◆ GetGlobalDest()

_.Library.String GetGlobalDest ( _.Library.String  Namespace,
_.Library.String  Global,
_.Library.String  Subscript 
)
static

Returns the system^directory where ^[Namespace]Global(Subscript) is mapped to.

If Subscript is missing, it returns the location for ^[Namespace]Global. If Global is missing, it returns the default global location for Namespace.
This API support multi-level subscripts mapping, for example, pass "abc",1,2 in Subscript will check the destination of Global("abc",1,2).
If the system is the same as the local system, then system is set to "".

◆ GetNSInfo()

GetNSInfo ( _.Library.String  Namespace,
_.Library.String  Info,
_.Library.Boolean  DontConnect 
)
static

Return information about a namespaces default global database.


Parameters:
Namespace - Namespace to obtain information about. Can be either a real namespace or an implied namespace. Real namespace must be in uppercase.
DontConnect - If the namespace's default database is a remote database mounted across ECP, then if set to 1, and the remote database is not mounted, we will not try to mount it (default = 0).

Return Values:
Returns an array of information about the default global database.
Info("System") - name of system default global directory resides on.
Info("Directory") - Name of default global directory.
Info("Resource") - Name of resource attached to the directory.
Info("ReadOnly") - 0/1 is the database mounted read only.
Info("Mounted") - 0/1 is the database mounted.
Info("Status") - 1 = Success, Status if any kind of error.

This also returns a second level of subscript with the same values, but subscripted by "GlobalDB" and "RoutineDB". This allows us to return info about the default Routine database for the namespace e.g.
Info("GlobalDB","System")
Info("RoutineDB","System")
If an implied namespace is passed in, ^SERVER^DIR, and the SERVER is the local system, then the database is treated as a local database, and Info("System") will be returned as "".

◆ GetPackageDest()

_.Library.String GetPackageDest ( _.Library.String  Namespace,
_.Library.String  Package 
)
static

Returns the system^directory where Package is mapped to in this Namespace.

If Package is missing, it returns the default package location for Namespace. If the system is the same as the local system, then system is set to "".

◆ GetRoutineDest()

_.Library.String GetRoutineDest ( _.Library.String  Namespace,
_.Library.String  Routine,
_.Library.String  Type 
)
static

Returns the system^directory where Routine is mapped to in this Namespace.

If Routine is missing, it returns the default routine location for Namespace. The allowed types are: INC, INT, MAC and OBJ. If the system is the same as the local system, then system is set to "".

◆ ListAll()

_.Library.Status ListAll (   array,
_.Library.Boolean  ConvertImplicit 
)
static

The ListAll method quickly returns a list of all the.

namespaces in the current process. The parameter array is a local array name passed by reference. On return from ListAll, the subscripts of the array parameter will be the namespace names of the current process. Each subscripted entry in array will contain the empty string. When ConvertImplicit is true, it will convert the '@' in implicit namespace to '^'. The default value of ConvertImplicit is true when it is not specified.

Each explicit namespace is returned using the local namespace name as the subscript string. Each implicit namespace is returned using a subscript string that contains a caret ^, followed by the system name, followed by another caret ^, followed by the name of directory containing the database file. If the implicit namespace is local then the system name is the empty string and the subscript string starts with two adjacent carets ^^.