TMF Application Programmer's Guide (G06.24+)

Designing Single-Threaded Processes
HP NonStop TMF Application Programmer’s Guide—522419-004
2-3
Terminating Transactions
Terminating Transactions
A requester must always match every BEGINTRANSACTION call with a corresponding
ENDTRANSACTION or ABORTTRANSACTION call. This is true even if another
process aborts the transaction.
ENDTRANSACTION
Requesters use ENDTRANSACTION to terminate transactions. ENDTRANSACTION
directs TMF to make permanent all changes that the transaction made to audited files.
For single-threaded requesters, ENDTRANSACTION normally suspends the requester
until the transaction is either committed or aborted.
Because ENDTRANSACTION is a function-type procedure, it returns a file system
error code in the status variable. The code 0 indicates successful completion; a
nonzero code indicates that the transaction could not be committed. For a complete
list of the file system error codes that apply to ENDTRANSACTION calls, see
Parameters under the description of ENDTRANSACTION in Section 4.
ABORTTRANSACTION
After issuing a BEGINTRANSACTION call and before issuing a corresponding
ENDTRANSACTION call, a requester can abort the transaction by calling the
ABORTTRANSACTION procedure.
The requester can abort a transaction even if there are servers that still have work in
progress on behalf of the transaction.
If issued within a requester, an ABORTTRANSACTION call provides the necessary
match for the associated BEGINTRANSACTION call (the requester does not have to
also issue an ENDTRANSACTION call).
ABORTTRANSACTION backs out all changes made to audited files on behalf of the
aborted transaction. ABORTTRANSACTION also prevents any further changes from
being made to audited files on behalf of the aborted transaction (or at least guarantees
that any such changes will be undone shortly after they occur).
248 A line handler failure occurred (the request was terminated).
249 A network failure occurred (the request was terminated).
250 All paths to a required system are down (the request did not get started).
251 A network protocol error occurred (the request was terminated).
252 A required Expand class is not available (the request did not get started).
255 A line handler came up too often.
Table 2-1. WRITEREAD Error Numbers (page 2 of 2)
Error Number Meaning