TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-195
#IN Built-In Variable
#IN Built-In Variable
Use #IN to specify or obtain the name of the file currently being used by TACL as its IN
file.
Result
#IN returns the name of the file currently being used for input by TACL.
Considerations
At TACL startup time, #IN contains the name of the file currently being used as the
TACL IN file. This file is called the primary IN file. To temporarily receive
commands from an alternate source, push #IN and set #IN to another file or
device. To restore the primary IN file, pop #IN.
The contents of the #IN built-in variable determine the file or process from which
TACL reads commands.
TACL can store two IN file settings:
At startup time, the #IN built-in variable contains the name of the file currently
in use as the TACL IN file. For an interactive terminal, #IN is initialized to the
name of your home terminal. This is considered the primary IN file. You cannot
permanently change the IN file for TACL; that is, the primary IN file always
remains the same.
When you set #IN to a file other than the primary file, this file is known as the
current IN file.
The default IN file for processes run by TACL is not affected by #IN; it remains
associated with the original TACL IN file. You can, however, use #INPUT or
#INPUTV with the current IN file established by #SET #IN.
When you use #SET #IN, it does not take effect until the next time TACL prompts
for a command. Therefore, if you include a #SET #IN in a macro or routine, lines
are not read from the new IN file until all lines resulting from the macro or routine
have been processed.
To set #IN to a disk file, TACL must allocate one of its block buffers internally.
Because these block buffers are large and must be allocated from the first 64,000
bytes in the TACL address space, there are only four of them. (Other consumers of
these blocks include the #OUT and #REQUESTER built-in functions.)
Any error, including EOF, on a pushed #IN variable causes #IN to be popped at
once. Any other error or break occurring while #IN is pushed causes all but the
bottom level to be popped from #IN.
#IN