InterSystems: The power behind what matters   

Long Strings
Caché supports two maximum string length options:
Long strings are enabled by default. If long strings are enabled, the maximum length of a string is 3,641,144 characters. If long strings are disabled, the maximum length of a string is 32,767 characters.
Attempting to exceed the current maximum string length results in a <MAXSTRING> error.
You can return the current system-wide maximum string length by invoking the MaxLocalLength() method, as follows:
   WRITE $SYSTEM.SYS.MaxLocalLength()
You can use any of the following operations to enable or disable long strings system-wide:
When a process actually uses a long string, the memory for the string comes from the operating system’s malloc() buffer, not from the partition memory space for the process. Thus the memory allocated for actual long string values is not subject to the limit set by the maximum memory per process (Maximum per Process Memory (KB)) parameter and does not affect the $STORAGE value for the process.

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA