Originally Posted by HamzaAhmed
Using the same handle will keep writing to the first file IMHO. Zorro stalwarts can shed more light.

That's wrong. Handles are for in-memory allocations only. You can re-use the same handle many times to write completely different files.

To reset a dataSet, use dataNew:
https://zorro-project.com/manual/en/data.htm