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:
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).
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.ProcessQueryOpens in a new tab 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).
- DO (legacy version) – Argumentless: executes the block of code that immediately follows it in the same program.
- FOR (legacy version) – Executes a command loop repeatedly, testing at the beginning of each loop.
- IF (legacy version) – Evaluates an expression, then selects which line of code to execute based on the truth value of the expression.
- ZQUIT (legacy command) – Exits a program with error handling.
- ZSYNC (legacy command) – Synchronizes and forces the end of networked transactions for the current job.
- $ZBITAND (legacy function) – Bitstring function – AND.
- $ZBITCOUNT (legacy function) – Bitstring function – COUNT.
- $ZBITFIND (legacy function) – Bitstring function – FIND.
- $ZBITGET (legacy function) – Bitstring function – GET.
- $ZBITLEN (legacy function) – Bitstring function – LENGTH.
- $ZBITNOT (legacy function) – Bitstring function – NOT
- $ZBITOR (legacy function) – Bitstring function – OR.
- $ZBITSET (legacy function) – Bitstring function – SET.
- $ZBITSTR (legacy function) – Bitstring function – STRING.
- $ZBITXOR (legacy function) – Bitstring function – XOR.
- $ZINCREMENT (legacy function) – Adds a specified increment to the existing value of a global or local variable.
- $ZNEXT (legacy function) – Returns a full reference to the next array node.
- $ZORDER (legacy function) – Returns the full reference for the next array node subscript.
- $ZPREVIOUS (legacy function) – Returns the previous array node subscript for the specified variable.
- $ZSORT (legacy function) – Returns the next subscript in the array of the specified subscripted variable.