Using $Receive; Table 5-5 Functions To Use With $Receive - HP TACL Programming Manual

Tandem advanced command language
Table of Contents

Advertisement

To establish your TACL program as a requester process, follow these steps:

Using $RECEIVE

1.
If the process does not already exist, start the process as appropriate.
2.
To open the process, issue a #REQUESTER READ call.
3.
To send a message, append data to the prompt variable. Unlike communication to
a disk file (described in Section 4, "Accessing Files"), TACL issues a WRITEREAD
operation and sends the prompt data to the process or device. The process reads
the data from its $RECEIVE file. When the process or device replies, TACL stores
the reply into the read variable associated with the process or device.
4.
To access the reply, extract lines from the read variable.
5.
When finished, issue a CLOSE request and supply one of the variable levels
associated with the file.
These guidelines apply to processes associated with devices as well as other types of
processes.
Table 5-5 lists the functions and commands with which you can run a process and
communicate through its $RECEIVE mechanism. You can request waited or nowaited
I/O.
Table 5-5. Functions to Use With $RECEIVE
TACL Function or Command
#REQUESTER with the READ option
#APPEND(V)
#EXTRACT(V)
#REQUESTER with the CLOSE option
Generating Waited and Nowaited Requests
When you communicate using $RECEIVE, you can specify waited or nowaited
communication:
For waited communication, TACL sends the WRITEREAD and continues
executing code until it encounters a statement that refers to one of the
#REQUESTER variables. TACL then waits until the current operation is complete
before initiating the next write. To open a running process and specify waited
communication, issue a #REQUESTER READ call with the WAIT option. The
following statement opens $T1 for waited I/O:
107365 Tandem Computers Incorporated
#REQUESTER /WAIT/ READ $T1 read_error read_var prompt_var
Initiating and Communicating With Processes
Description
Opens the process (by name)
Sends a WRITEREAD to the process
Retrieves results
Closes the process
Using $RECEIVE
5–21

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents