Programming Guide



sm_tm_iset

Sets the value of a transaction attribute

#include <tmusubs.h>
int sm_tm_iset(int attribute, int value);

attribute
Specifies the integer attribute of the current transaction to change with one of the constants shown in Description.

value
attribute's new value.

Returns

Description

sm_tm_iset changes the value of an integer attribute of the current transaction. This includes not only data in the current transaction structure itself, but also data that can be found indirectly, such as data relating to the current table view.

Supply one of the following constants to specify the transaction attribute to be changed:

TM_CANCEL_ON_DISCARD
Sets cursor-related behavior that is associated with the transaction event TM_FINISH. The default setting is 1, which ensures that all cursor-associated locks are released when the FINISH command executes. For behavior that is backward compatible, supply a value of 0. This change affects all outstanding and subsequent transactions for the current database connection.

TM_EMSG_USED
If set to 1, no error message is displayed when sm_tm_command returns to its caller. Indicates that the error message was displayed by sm_tm_command.

TM_MSG
User specified message code to use for exit condition after a call to sm_tm_command.

TM_OCC
Occurrence number being processed.

TM_OCC_COUNT
The number of occurrences in the table view.

TM_PROPOSE_MSG
A conditional value for TM_MSG; used only if there is no existing value.

TM_PROPOSE_STATUS
A conditional value for TM_STATUS; used only if there is no existing value.

TM_QUERY_ACTION
Return code from TM_QUERY. Models return:

TM_DISCARD_ACTION

Discard changes

TM_EXIT_ACTION

Return to screen without discarding changes

TM_STATUS
Error indicator.

TM_SV_SEL_COUNT
Set to 1 to get the size of the select set for the server view (either SELECT or VIEW).

TM_SV_SEL_REQUEST
Request that gave rise to the current select cursor for the table view (either SELECT or VIEW).

TM_USER_VALUE
Reserved for user use.

TM_VALUE, TM_VALUE2
General purpose integer.

TM_XA_TRANSACTION_BEGUN
For the Tuxedo middleware adapter, this argument sets the transaction model to start an XA transaction.

See Also

sm_tm_inquire, sm_tm_pcopy, sm_tm_pinquire, sm_tm_pset