@V – Return the value of a named variable
This function returns the value of a named variable.
@V(<variable-name>)
where <variable-name>
is the name of
the variable to return. The VARSUB
prefix
(for example, the exclamation mark) must be coded only if you want
to return the value of a variable named within a variable.
Variable substitution does not need to be active for @V
to
work. Variable substitution can be used as a mechanism to subscript
variables, such as object variables.
For example, the command:
VARSUB SCAN (!)
SELECT AD ADID(DAILYPLANNING) OBJECT(FREDDO)
DO X = 1 TO !@FREDDO-#ADOP
DISPLAY @V(@FREDDO-ADOP-!X.-ADOPWSID) @V(@FREDDO-ADOP-!X.-ADOPJN)
END
produces output displaying workstation and job name for each operation in the
object:NONR ZFIRST
CPU1 WSLCLTEX
CPU1 WSLCCPEX
NONR ZLAST