Skip to main content

This is documentation for Caché & Ensemble. See the InterSystems IRIS version of this content.

For information on migrating to InterSystems IRIS, see Why Migrate to InterSystems IRIS?


Manage globals programmatically (import, export, get size, set collation, configure mappings, and so on).

Background Information

Caché stores all data in its databases in globals. A single set of rules governs the names of globals and the names of their subscripts (that is, different languages do not have different rules). See “Introduction to Globals” in the Caché Programming Orientation Guide and see the book Using Caché Globals.

You can define global mappings so that you can access data in a non-default location; see “Configuring Namespaces” in the chapter “Configuring Caché” in the Caché System Administration Guide. Typically you do this within the Management Portal.

The Management Portal also provides options for examining and managing globals. See “Managing Globals” in Using Caché Globals.

Available Tools

The fundamental tools for working with globals are the ObjectScript, MVBasic, and Caché Basic languages. In addition, InterSystems provides the following tools:

This structured system variable returns information about globals.

Availability: All namespaces.

%Global class

Provides the following class methods:

  • Export()

  • Import()

Availability: All namespaces.

Enables you to see and modify properties of globals. It provides the methods like the following:

  • CheckIntegrity()

  • CollationSet()

  • GetGlobalSize()

  • GetGlobalSizeBySubscript()

  • KillRange()

  • And others

Availability: All namespaces.

Maintains extent definitions and globals registered for use by those extents. It includes the following methods:

  • GlobalUses()

  • GlobalsUsed()

The %ExtentMgr tables are visible to SQL and can be queried directly. For details, see the reference for %ExtentMgr.Util.

Availability: All namespaces.

Provides the following queries:

  • DirectoryList()

  • NameSpaceList()

  • NameSpaceListChui()

  • Size()

Availability: All namespaces.

Provides an interface to globals. It includes methods like the following:

  • GlobalListClose()

  • Kill()

  • Set()

  • And others

It also provides a couple of queries.

Availability: All namespaces.

Provides the following methods that you can use with globals:

  • Export()

  • ExportToStream()

  • Load()

Availability: All namespaces.

Enables you to modify and obtain information about the [] section of the CPF file, which defines global mappings. (Note that you usually perform this configuration via the Management Portal, as noted above.)

The class also provides the List() class query.

The class documentation includes examples and details.

Availability: %SYS namespace.

%Installer.Manifest class and other classes in the %Installer package

Enable you to define and use an installation manifest. Among other tasks, you can configure global mappings.

Availability: All namespaces.


The special variable $SYSTEM is bound to the %SYSTEM package. This means that (for ObjectScript) instead of ##class(%SYSTEM.class).method(), you can use $SYSTEM.class.method().