This document describes how to create globals with correction collation for
use in conjunction the National Language Support in Caché.
Since Cache 4.1, the collation of newly created globals is automatically set
to the default collation of the database where the global is created. When a database
is created, you can set the default collation of the databaseeither Caché
Standard or to one of the collations installed on the system. Once the default collation
of the database is set, any globals created in this database are created with this
default collation.
Because any globals created in a database have the database's default collation,
Caché also supports the ability to override this behavior. To do this, use
the
CreateGlobal^%DM routine to create a global with the collation
desired:
CreateGlobal^%DM(ns,global,collation,protect,journal,keep,ptrblk,growthblk)
-
nsSpecifies the namespace, where
"" indicates
the current namespace, or
^^directoryname references a specific directory.
-
globalSpecifies the global name, including
leading
^, such as
^cz2.
-
-
protectSpecifies the protection attributes
for the global, where is 195 for default protection (RWD,N,N,RWD) This parameter is
typically not supplied.
-
journalSpecifies whether a global will be
journaled if the Journal Mode specifying selected globals option is set in the Configuration
Manager. 0 means do not journal, 1 means journal. This parameter is typically not
supplied.
-
keepSpecifies whether or not to keep the
global's directory entry when the global is killed. Setting this to 1 preserves the
collation, protection, and journal attributes if the global is killed. This parameter
is typically not supplied.
-
ptrblkSpecifies the starting block for pointers.
This parameter is typically not supplied.
-
growthblkSpecifies the starting block for
data. This parameter is typically not supplied.
In environments where some globals require different collations from other globals,
InterSystems recommends that a database be set up for each different collation, and
that a global mapping be added to the namespace which maps each global to the database
with its required collation. This method allows mixed collations to be used without
changing application code to use the
CreateGlobal%DM API.
Note:
In older versions of Caché, a newly created global would have the default
collation of the process creating it. This method of setting the collation is no longer
supported.
The following are supported in Caché, for use in the collation argument
of the
CreateGlobal^%DM routine: