| **Navigation:**  [[introduction.htm|Language Reference]] > [[chapter runtime properties.htm|App C - PROP: Runtime Properties]] > Complete Property List >PROP:TransactionHook | [[prop touched.htm|{{btn_prev_n.gif|Previous page}}]][[chapter runtime properties.htm|{{btn_home_n.gif|Return to chapter overview}}]][[prop type.htm|{{btn_next_n.gif|Next page}}]] | | || You can trap calls to the transaction handling functions **LOGOUT, COMMIT, and ROLLBACK** without having to attach a file callback to every file. To do this you use **SYSTEM{PROP:TransactionHook}**.  You set this property to the **address** of a function that has the prototype: myFUNCTION(SIGNED opCode, LONG state, *FILE file, *LONG stop, *CSTRING FileErrCode, *CSTRING FielErrMsg),LONG The callback function will be called at least 3 times for each operation. once at the start of the operation (in this case state = **TRANSTATE:STARTING**), once for each file in the transaction (in this case state = **TRANSTATE:HAVEFILE**) once at the end of the operation (in this case state = **TRANSTATE:ENDING**) the **opCode** parameter can be set to **DriverOp:LOGOUT, DriverOp:COMMIT, or DriverOp:ROLLBACK** the **file** parameter is assigned to one of the files in the transaction if **state **parameter = **TRANSTATE:HAVEFILE**. Setting the **stop** parameter to **TRUE** causes the RTL to stop execution of normal transaction handling code after this function exits Setting **FileErrorCode** and **FileError** parameters sets the values for FILEERRORCODE() and FILEERROR() respectively The return value is the ERROR() that the operation should set.  This function must return 0 if no error is to be reported.