Abort Transaction (21)
The Abort Transaction operation (B_ABORT_TRAN) terminates the current transaction and removes the results of all operations performed since the beginning of the transaction. It also unlocks all files and records locked by the transaction.
Parameters
Op Code
Pos Block
Data Buf
Data Buf Len
Key Buffer
Key Number
Sent
Returned
Prerequisites
You must issue a successful Begin Transaction operation (19 or 1019) before you issue an Abort Transaction operation.
Procedure
Set the Operation Code to 21. The transactional interface ignores all other parameters on an Abort Transaction call.
Result
If the Abort Transaction operation is successful, the transactional interface returns Status Code 0. The results of all Insert, Update, and Delete operations issued since the beginning of the transaction are removed from the files.
If the Abort Transaction operation is unsuccessful, the transactional interface returns one of the following status codes:
36
The application encountered a transaction error.
39
A Begin Transaction operation must precede an End/Abort Transaction operation.
Positioning
The Abort Transaction operation has no effect on any file currency information.