lrt_tpabort
| Transaction Handling Functions |
Aborts the current transaction.
int lrt_tpabort( long flags );
| flags | Reserved for future use. Should be set to 0. |
The lrt_tpabort function aborts the current Tuxedo or System/T transaction. This signifies an abnormal end of a transaction. All changes made to resources during the transaction are undone. lrt_tpabort can only be called by the initiator of the transaction.
Return Values
If the function ends with an error, it returns -1 and sets the error code in tperrno.
Parameterization
You cannot use standard parameterization for any arguments in this function.
Example
In the following example, the lrt_tpabort function aborted the account inquiry because the account number was invalid.
/* account number 69999 doesn't exists*/
lrt_Fadd_fld((FBFR*)data_0, "name=ACCOUNT_ID", "value=69999", RT_END_OF_PARMS);
tpresult_int = lrt_tpcall("INQUIRY", data_0, 0, &data_0, &olen_2, 0);
lrt_tpabort(0);

