Running a TACL Process as a Server
Running TACL as a Sever
6–4
107365 Tandem Computers Incorporated
Special Actions of the #INPUT(V) Built-In Function
When TACL acts as a server, it can process statements from $RECEIVE or statements
coded within the TACL process. Action of the #INPUT(V) built-in function depends
on the origin of the #INPUT(V) call:
When a server TACL process executes an #INPUT(V) built-in function as part of
its own code, it reads from $RECEIVE, executes the text in that message, and
replies with the results.
When a requester sends a message that contains an #INPUT(V) built-in function,
TACL behaves differently. Upon recognizing the #INPUT(V) built-in function,
TACL replies immediately with whatever is contained within its reply buffer. It
then reads the next message from $RECEIVE and postpones the processing of any
remaining functions or commands that may have followed the #INPUT(V) call in
the first request. After receiving the second message, TACL processes the text in
that message and the resumes processing the text left over from the first message.
After TACL processes all of the message text, it replies with the results of the
second message and the results from the leftover text in the first message.
The second mechanism is not used frequently; the description is provided to explain
the action of TACL in case such use should occur.
Directing Output From
TACL
As a server, TACL can issue only one response for each request—a operating system
restriction. Requests and responses are limited to 5000 bytes, although they can span
multiple lines.
Specifying the OUT File
TACL normally sends output to its OUT file. When TACL operates as a server, you
can specify the OUT file as $RECEIVE:
23> TACL /NAME $name, IN $RECEIVE, OUT $RECEIVE, NOWAIT/
If you specify OUT as $RECEIVE, all normal output (up to 5000 bytes) is included in
the next REPLY. If you specify OUT
filename
, TACL writes all its output to
filename
, as usual, and does not include it in the next REPLY.
If you supply OUT without a file name, TACL discards its normal output.
This flexibility allows you to construct TACL environments that function properly
whether TACL is operating as a requester or as a server.