TMF Application Programmer's Guide (G06.24+)
Designing Single-Threaded Processes
HP NonStop TMF Application Programmer’s Guide—522419-004
2-2
Delegating Work to Servers
•
RESUMETRANSACTION (tag)—resets the current transaction from the nil state
to the transaction ID of the transaction identified by the specified
BEGINTRANSACTION tag value
•
WRITEREAD—sends a work request to a server process and accepts a reply from
the server
Delegating Work to Servers
To subcontract a unit of work to a server process, the requester must:
1. Open the server process by using the FILE_OPEN_ system procedure.
2. Format a work request message.
3. Send the work request message to the server by using the WRITEREAD system
procedure.
The FILE_OPEN_ call includes, as its first parameter, the server process name instead
of a file name. All necessary process names, in local and network form, can be
predefined so they are known throughout both the system and the network.
The requester and any servers it communicates with must all use the same work
request message format.
The WRITEREAD call includes, as its first parameter, the file number returned by the
FILE_OPEN_ call.
WRITEREAD returns a condition code upon completion. The condition code CCE (=)
indicates successful completion. The condition code CCL (<) indicates that an error
occurred. For CCL completions, you can obtain the file system error code by calling the
FILEINFO system procedure. Table 2-1 lists those error codes that apply to
WRITEREAD calls.
If you are using nowait WRITEREAD calls, the error notification is returned with the
associated AWAITIO call.
Table 2-1. WRITEREAD Error Numbers (page 1 of 2)
Error Number Meaning
40 For nowait WRITEREAD operations, this code indicates that the AWAITIO
call timed out before the server could reply.
201 A server process or its processor module failed while the server was
working on the transaction.
211 A work request could not be delivered to a server because the processor
module containing the server had already failed.
240 A line handler failure occurred (the request did not get started).
241 A network failure occurred (the request did not get started).
246 A fiber optic extension (FOX) network direct route failure occurred (the
request was terminated).