You end a transaction by indicating to Net.Data that you no longer want your macro to be persistent.
To end the transaction:
Use the DTW_TERMINATE() built-in function to specify the end of a transaction. Like the DTW_ACCEPT() function, this function must be called before any output is generated by the macro and is typically specified as the first element in an HTML block. DTW_TERMINATE tells Net.Data that this invocation is the last invocation in the current transaction.
Syntax: @DTW_TERMINATE()
This function does not accept any parameters.
Example:
%html(quit) { @DTW_TERMINATE() ... %}