RSC/MP 7.2 Programming Manual

Application Development
HP NonStop Remote Server Call (RSC/MP) Programming Manual522360-004
6-7
Generating Transactions Explicitly
Generating Transactions Explicitly
To generate a TMF transaction explicitly, follow these steps:
1. Issue an RscBeginTransaction function call to begin the transaction.
2. Issue one or more RscWrite or RscWriteRead calls to alter the content of one or
more rows or records in the database. After each call, examine the return code.
Success (a return value of zero) indicates that the operation completed
successfully and that you can proceed with the next call. Any other return code
indicates that something went wrong and that either the transaction was aborted,
or that you must explicitly abort the transaction by issuing an RscAbortTransaction
function call. Whenever a transaction is aborted, all changes that it made to the
database are backed out.
3. Issue an RscEndTransaction function call (unless you issued the
RscAbortTransaction call which aborts/ends the transaction) to end the transaction.
A return code indicates whether the transaction ended successfully or was
aborted. If the transaction ended successfully, all changes that it made to the
database are committed (made permanent). If the transaction was aborted, any
changes that it made to the database are backed out.