TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-166
#EXTRACTV Built-In Function
#EXTRACTV Built-In Function
Use #EXTRACTV to move the first line of a variable level to another variable level. You
can also use #EXTRACTV to set the binary data of a STRUCT directly, by extracting
the first line from a variable level of another type and placing it in the STRUCT. No type
checking is performed. (This use is primarily for accepting structured data from the
variables associated with requesters and servers.)
from-variable-level
is the name of an existing variable level; #EXTRACTV deletes the first line of this
variable level.
to-variable-level
is the name of a variable level. #EXTRACTV puts the deleted line from from-
variable-level into this variable level. If this variable already exists, its
previous contents are lost. If this variable does not exist, an error occurs.
Result
#EXTRACTV returns nothing.
Considerations
The construct
#EXTRACTV var struct
is not equivalent to
#SET struct [#EXTRACT var]
The former construct is faster and is not subject to errors resulting from type checking.
If the data supplied exceeds the data area of the specified STRUCT, TACL
discards the excess bytes without any notification.
If the data supplied is shorter than the data area of the STRUCT, TACL sets the
entire STRUCT to default values and then moves the data into the beginning of the
data bytes of the STRUCT.
To retrieve the first line of a variable level as the function result, use the
#EXTRACT built-in function.
#EXTRACTV from-variable-level to-variable-level