Share this page

# 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.

Copy code

    /* 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);

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: