Running Tacl Code As A Server; Constructing A Tacl Server - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

Running TACL Code
To provide TACL code for use by a TACL server process, you must provide a link to a
as a Server
TACL process that is running your code. There are several ways to accomplish this,
including:
Open the TACL process as described in Section 5.
One way to accept requests and reply with messages in a specified format is to build a
Constructing a TACL
Server
loop using #INPUTV and #REPLYV and protect it with an exception handler. Figure
6-2 shows an example a TACL program that uses an #INPUTV and #REPLYV loop.
Using #REPLYPREFIX
Pathway programs can use TACL as a server. You can use #REPLYPREFIX to prefix
each reply with a 16-bit binary code. The #REPLYPREFIX built-in variable can be
empty or it can contain any numeric value in the range 0 through 65535. If
#REPLYPREFIX is not empty, its value precedes each response; if #REPLYPREFIX is
set, replies can be up to 5002 bytes long.
Using #REPLY and #REPLYV
Normally, if the OUT file is not set to $RECEIVE, then all output is excluded from the
reply. However, #REPLY(V) forces text to be included in the reply buffer, regardless
of the setting of the OUT file.
Requests and replies (except the part generated by #REPLYPREFIX) consist of ASCII
characters with internal line breaks encoded as null bytes.
When functioning as a server, TACL stores #REPLY(V) text and, if OUT is set to
$RECEIVE, its normal output as well. TACL replies with the buffer contents when it
has processed all of the text that was included in the request. If the accumulated
response exceeds 5000 bytes, TACL discards the excess without notification.
TACL can have as many as 100 openers. All openers of a given TACL process can
never have more than one message outstanding to TACL at a time, unless the
processes have opened TACL without a #SERVER name.
107365 Tandem Computers Incorporated
ASSIGN the TACLCSTM file to a TACL macro or routine that contains the code.
Include access to the code from your TACLCSTM file. (When you start a TACL
process, the process accesses your TACLCSTM file.) Your TACLCSTM file can
check #TACLOPERATION, which indicates whether a TACL process is receiving
input from an IN file (REQUESTER) or $RECEIVE (SERVER).
Process the input through a server path defined by the #SERVER built-in function,
described in Section 5, "Initiating and Communicating With Processes."
Running TACL as a Server

Running TACL Code as a Server

6–5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents