Caché ObjectScript Reference
Legacy Commands and Functions
In most cases, legacy commands and functions have been replaced by newer implementations with different syntax. These commands and functions should not be used in new programming. They are documented here for compatibility with existing program code. Note that legacy commands and functions are not compatible with their replacements; though they may appear in the same program, they should never be combined. For example, you should not use a block-oriented IF
with the legacy line-oriented ELSE
, or attempt to manipulate a bitstring created with a $BIT
function using a $ZBIT
function, or vice versa.
The following legacy commands have been replaced by new command syntax:
The legacy IF
, and FOR
commands do not use curly brace block structure syntax. Instead, they execute commands that appear on the same program line. They are thus much more restricted as to line formatting than the newer block-oriented versions of these commands.
In addition, the legacy IF
command cannot use the ELSEIF
clause, and uses the $TEST
The legacy argumentless DO
uses a period prefix syntax to indicate block structure. This syntax has been superseded and is not compatible with curly brace syntax. The argumentless form of DO
should not be used for future coding.
The following legacy commands are obsolete:
is only used for the obsolete Distributed Cache Protocol (DCP).
The following legacy functions have been replaced by %SYS.ProcessQuery
class properties: $ZUTIL(67,0)
, and $ZUTIL(67,15)
. Refer to the Replacements for ObjectScript $ZUTIL Functions
table for details.
The following legacy function is no longer needed to distinguish Windows platforms: $ZUTIL(100)
The following legacy function is no longer needed for Caché upgrades: $ZUTIL(113)
The following legacy function supports the superseded ViewPoint metric counters: $ZUTIL(133)