Skip to main content

Structured System Variables

A structured system variable name, or SSVN, is a nonscalar system variable that is organized like a global variable. SSVNs allow you to write portable programs that can retrieve information about system data. The same ObjectScript code can retrieve system data information from any InterSystems IRIS® data platform implementation using structured system variables.

Each SSVN has a structure where subscript values are any of the following:

  • Entity identifiers

  • Literals

  • Attribute keywords.

You provide information about entities by providing values for subscripts which are identifiers and for attribute nodes.

SSVNs use the caret and dollar sign (^$) as a standard prefix followed by:

  1. An optional (extended syntax ) specification of the namespace about which you want information

  2. One of a designated list of names.

You then follow the name with one or more expressions in parentheses. These expressions are called subscripts. The syntax is as follows:

^$[|namespace|] ssvn_name(expression)

Generally, you cannot use SET and KILL commands for structured system variables because they do not necessarily have data values. The information that structured system variables provide is often the existence of specific subscript values. In most cases, you can use the $DATA, the $ORDER, and the $QUERY functions to examine subscript values.

InterSystems IRIS® data platform supports the following structured system variables:

  • ^$GLOBAL

  • ^$JOB

  • ^$LOCK

  • ^$ROUTINE

The meaning of each of these SSVNs and use of their subscripts is explained in the following sections.

Each description identifies which functions are allowed with the particular structured system variable. Each description contains one or more examples about how to use structured system variable as arguments to the $DATA, $ORDER, and $QUERY functions to scan system table information.

  • ^$GLOBAL – Provides information about globals and process-private globals.
  • ^$JOB – Provides InterSystems IRIS process (job) information.
  • ^$LOCK – Provides lock name information.
  • ^$ROUTINE – Provides routine information.
FeedbackOpens in a new tab