Hi,
Here is another example:
/end of day function - triggered by tickerplant at EOD
.u.end:{ hclose LogfileHandle; /close the connection to the old log file
/create the new logfile
logfile::hsym `$"RealTimeTradeWithAsofQuotes_",string .z.D; .[logfile;();:;()];
/Initialise the new log file
LogfileHandle::hopen logfile; {delete from x}each tables `.};
Hope this helps.