TACL Reference Manual

UTILS:TACL Commands and Functions
HP NonStop TACL Reference Manual429513-018
8-74
FILETOVAR Command
FILETOVAR Command
The FILETOVAR command copies data from a file and appends it to a variable level.
file-name
is the name of an existing file from which data is to be copied. It must be readable
by the sequential I/O facility (SIO). Both format1 and format 2 files are supported.
variable-level
is the name of an existing variable level to which the copied data is to be
appended. The variable must not be in a shared segment and must not be a
directory, a STRUCT, or a STRUCT item.
Considerations
Lines longer than 239 characters in the file are truncated to 239 characters when they
are appended to the variable level.
File I/O appears in PLAIN format, which means that no special interpretation is given to
the TACL metacharacters [, ], |, ==, {, and } when they are read. In particular, this
means that you cannot copy TACL statements from a file to a variable unless you
wrote the statements into the file with the VARTOFILE command originally. (When
TACL loads code from a file into a variable, it processes metacharacters to produce
executable code, but FILETOVAR only moves text into the variable.)
Another, faster way to append data to a variable level is to use the #SET command:
#SET /IN file-name/ variable
As with the FILETOVAR command, TACL INFORMAT must be set to PLAIN when
using the #SET function in this manner.
FILETOVAR file-name variable-level