There is a limit to the length of a value of a variable. If you have long strings
enabled in your installation (as they are by default in new installations as of release 2012.2), the limit is 3,641,144 characters. If long strings are not enabled, the limit is 32,767 characters.
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 per Process Memory
setting on the System Memory and Startup Settings
page and does not affect the $STORAGE
value for the process.
It is important to realize that strings
are not just the result of reading from input/output devices. They can show up in other contexts such as the data in the rows of a resultset returned by an SQL query, by construction of $LISTs with a large number of items, as the output of an XSLT transformation, and many other ways.
If long strings are not enabled, Caché cannot guarantee that an application can take advantage of published limits. These limits all assume that long strings are enabled, unless otherwise noted.
Limit: 32768 unique references per routine or class.
For example, the following is counted as two class name references:
Do ##class(c1).abc(), ##class(c2).abc()
instance method references
Limit: 32768 per routine or class.
are OREFs, the following counts as one instance method reference:
References to multidimensional properties are counted as instance methods because the compiler cannot distinguish between them. For example, consider the following statement:
Because the compiler cannot tell whether this statement refers to the method xyz()
or to the multi-dimensional property xyz
, it counts this as an instance method reference.
Limit: 65535 per routine or class.
A target is label^routine (a combination of label and routine).
Any target reference also counts as a routine reference. For example, the following is counted as two routine references and three target references:
Do Label1^Rtn, Label2^Rtn, Label1^Rtn2