Executes a MultiValue command from a program, exiting the program.
command executes the specified Caché MultiValue command, but does not return execution to the MVBasic program. Commonly, CHAIN
is used with the MultiValue RUN
command to chain execution from one program to another. It initially searches the VOC for the command
; if the command
is not found in the VOC, it searches the global catalog. For lookup details, refer to CATALOG
in the Caché MultiValue Commands Reference
does not create a new execution environment. Therefore any select lists that were active when CHAIN
was invoked are retained as the active select lists of the invoked command
cannot pass values to command
. Because CHAIN
does not return to the invoking program, it cannot pass a return value from command
EXECUTE, PERFORM, and CHAIN
command executes one or more MultiValue commands from within MVBasic, then returns execution to the next MVBasic statement in the invoking program. EXECUTE
creates a new execution environment; select lists that were active when EXECUTE
was invoked are not retained by its invoked MultiValue commands. EXECUTE
can explicitly pass values to the MultiValue command(s) and return values from the MultiValue command(s).
command executes one or more MultiValue commands from within MVBasic, then returns execution to the next MVBasic statement in the invoking program. PERFORM
cannot pass or return values.
command executes a single MultiValue command from within MVBasic. It does not return execution to the invoking program. CHAIN
cannot pass values.
The following example issues the MultiValue RUN
command, to initiate execution of the bignumprog
CHAIN "RUN bignumprog"
PRINT "continuing execution"
In jBASE emulation, CHAIN
does not pass the default select list (select list 0) to the invoked program.
In UniData and UDPICK emulations, a command
name with an initial character of * is handled as a global name. CHAIN
removes the leading * and then looks up the resulting command name in the global catalog in SYS.MV, rather than looking up in the VOC. If the runtime environment is not a UniData emulation, a normal VOC lookup is done on the *command
© 1997-2019 InterSystems Corporation, Cambridge, MA