![]() | Programming Guide | ![]() |
Closes the current transaction manager transaction
int sm_tm_command ("FINISH");
FINISHcontains the screen exit processing needed by the transaction manager and is called automatically on screen exit. Therefore, if you use only the default transaction manager transaction on your screen, you do not need to explicitly call this command.As part of its processing,
FINISHcloses the current transaction, which has been set with theSTARTorCHANGEcommands. In cases where you initiate a transaction by calling theSTARTcommand, you must also call theFINISHcommand to close that transaction before closing the transaction's screen. Note that you might need to call theCHANGEcommand to make the transaction active before closing it with theFINISHcommand.The
FINISHcommand is called after the named screen exit function and after the default screen function. AfterFINISH, the transaction manager data structures for what had been the current transaction no longer exist.
The following procedure closes two additional transactions and then changes back to the main transaction which is assumed to have been active when the procedure is invoked and which is closed on screen exit.
proc close_tranvars main_tranmain_tran = sm_tm_pinquire(TM_TRAN_NAME)call sm_tm_command("CHANGE tran1")call sm_tm_command("FINISH")call sm_tm_command("CHANGE tran2")call sm_tm_command("FINISH")call sm_tm_command("CHANGE :main_tran")return 0Also, refer to the
STARTcommand.
![]()
![]()
![]()
![]()