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?

Storing a String

Storing a string on disk, permanently, is just as easy as using regular variables. Just use the ^ (caret) character as the first character of the variable name. The example saves a string in the variable ^x which is different than the regular variable x. Even if you kill all regular variables, ^x remains. We'll discuss this topic in detail soon.

SAMPLES>set x = 4

SAMPLES>set ^x = "Store this on disk"

SAMPLES>kill

SAMPLES>write

SAMPLES>write ^x
Store this on disk
SAMPLES>
Feedback