HP NonStop G-Series User Manual
Page 23
Client Programming
Introduction to the Tandem DDE Gateway
110838 Tandem Computers Incorporated
1–11
The employee number sent with the DDE Poke function is supplied in CF_TEXT
format. The Tandem DDE Gateway, using the workstation-based DDE Gateway
Dictionary (created by the Bridge program), performs the necessary data
conversion and places the data item at the correct offset in a buffer. Note that you
do not need to define a message layout or perform data conversions in the client
application.
The client application should do as many DDE Poke functions as necessary to set
up the data elements required by the Tandem server for the transaction type
specified on the INITIALIZESERVICE command. The INITIALIZESERVICE
command initializes the Tandem DDE Gateway buffer that will be sent to the
Tandem server to binary zeros, so areas of the buffer into which no data has been
placed by a DDE Poke function remain set to binary zeros.
5.
Use the DDE Execute function with the [SEND] command to tell the Tandem DDE
Gateway to send the request message to the Tandem server and store the reply
message in a buffer in the Gateway.
6.
Use the DDE Request function to tell the Gateway to return individual data
elements from the reply message to your client application. Refer to the REPLY-
CODE data element in the DDE Request function by its fully qualified name,
READ-REPLY-MESSAGE.REPLY-CODE. Also, specify CF_TEXT for the format
on the DDE Request function.
7.
The Tandem DDE Gateway, by using the workstation-based Tandem DDE
Gateway Dictionary, locates the requested data element in the reply buffer,
performs the necessary data conversion, and returns the REPLY-CODE in
CF_TEXT format to the client application. Obtain as many data elements as your
client application requires with successive DDE Request functions.
8.
Use the DDE Execute function and either the [ENDTRANSACTION] or
[ABORTTRANSACTION] command to end or abort the TMF transaction.
Another DDE Execute function along with the [INITIALIZESERVICE...] command
could be used here to start another type of transaction, for example, to update
employee data. Or the same transaction type can be done again without another
[INITIALIZESERVICE].
9.
Use the DDE Terminate function to finish the DDE conversation with the Tandem
DDE Gateway.
Binary-Pass-Through
Approach
With the binary-pass-through approach, you define the message layouts in the client
application and convert the data with your client code. This is the more efficient
approach in terms of workstation CPU and disk utilization, but it can be cumbersome
to program and maintain. Also, not all client tools can handle the task of defining
message layouts and converting them.