Skip to main content
Previous section

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.

Legacy Commands

The following legacy commands have been replaced by new command syntax:

  • FOR

  • IF

  • ELSE

  • DO (without an argument)

The legacy IF, ELSE, 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 special variable.

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:

  • ZQUIT has been replaced by ZTRAP $ZERROR. Refer to the ZTRAP command for further details.

  • ZSYNC is only used for the obsolete Distributed Cache Protocol (DCP).

Legacy Functions

  • The following legacy functions have been replaced by the new $BIT functions: $ZBITAND, $ZBITCOUNT, $ZBITFIND, $ZBITGET, $ZBITLEN, $ZBITNOT, $ZBITOR, $ZBITSET, $ZBITSTR, $ZBITXOR.

  • The following legacy functions have been replaced by %SYS.ProcessQuery class properties: $ZUTIL(67,0), $ZUTIL(67,4), $ZUTIL(67,5), $ZUTIL(67,6), $ZUTIL(67,7), $ZUTIL(67,8), $ZUTIL(67,9), $ZUTIL(67,10), $ZUTIL(67,11), $ZUTIL(67,12), $ZUTIL(67,13), $ZUTIL(67,14), 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).