Figure 5-12 Communicating With Fup Using #Server - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

Initiating and Communicating With Processes
Using #SERVER
Note
5–30
Sending Commands
When your TACL program has a server path, other processes can open it and issue
WRITEREAD operations. TACL receives a prompt; your TACL process can then write
to the other process. This code is exactly the same as that used with #REQUESTER in
"Using $RECEIVE," earlier in this section.
Use the macro in Figure 5-12, serv, to communicate with a FUP process. The macro
obtains a server name and then uses it for the IN and OUT files of the FUP process.
The macro requests an INFO * operation.
Figure 5-12. Communicating With FUP Using #SERVER
?SECTION serv MACRO
#FRAME
#PUSH server_name in_v out_v prompt_v
== Assign a name to this process
#SET server_name [#SERVER /IN in_v, PROMPT prompt_v, OUT
out_v/]
== Start FUP and use this process for its IN and OUT files
FUP /IN [server_name], OUT [server_name], NAME $fp, NOWAIT/
== Wait for a prompt and issue a command
SINK [#WAIT prompt_v]
#APPEND in_v INFO *
SINK [#WAIT in_v]
SINK [#WAIT out_v]
== When we have a result, extract it and display all lines
#SET lines [#VARIABLEINFO /LINES/ out_v]
[#LOOP |WHILE| lines > 0 |DO|
#EXTRACTV out_v response
#OUTPUTV response
#SET lines [#COMPUTE [lines] - 1]
]
STOP $fp
#UNFRAME
You could use #NEWPROCESS instead of RUN in the previous example, which would allow you to
handle the results of the process initiation.
107365 Tandem Computers Incorporated
response lines

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents