Executes a transaction command#include <tmusubs.h>int sm_tm_command(char *cmd_string);
- Contains one of the following transaction commands and its associated parameters:
When specifying a command, the table view name is case sensitive; however, the command name and the optional parameters following the table view name are not case sensitive.
sm_tm_commandexecutes the specified transaction manager command. Before the command is processed, a test is performed to see if the specified command is available with the current mode.
By definition, a command is in progress from the moment
sm_tm_commandis called until the moment it returns. As it processes most commands,
sm_tm_commandinvokes transaction event functions and transaction models. These, in turn, should not invoke transaction manager commands, because the transaction manager cannot process its commands recursively. This implies that they should not close the active screen (which triggers a FINISH command), or cause any other screen to be displayed that contains table views (which triggers a CHANGE command).
For the transaction command START, the command keyword is followed by the transaction name and can also be followed by a table view name.int sm_tm_command(START
For the transaction command CHANGE, the command keyword is followed by the transaction name.int sm_tm_command(CHANGE
For other transaction commands, the transaction name is set by the previous START or CHANGE command and the parameter following the command is interpreted as a table view name.
If there is an additional
scopeparameter, it specifies a portion of the table view tree. The command is then applied only to those table views.int sm_tm_command(
scopeparameter must be preceded by a table view name and takes one of these arguments:
- Applies the command to the specified table view and all table views below it on the tree. If no parameter is specified, the transaction manager acts as though
- Applies the command to the table views below the specified table view.
- Applies the command to the specified table view only.
- Applies the command only to the table views of the specified server view.
Special processing occurs for the FETCH command. For
scopeparameter is either
FETCH_SPECIALwhich specifies the type of fetch processing.
int sm_tm_command("SELECT titles BELOW_TV");
For the syntax of transaction manager commands, refer to Chapter 8, "Transaction Manager Commands."