>This routine worked well for many years, but now there is one instance that the application continues to use the APP of the previously processed dataset. (It is an APP that contains a class created with createobject(). In the closing section the object variable is released.)
If it's observed only on client side where they have a newer Windows, how did you distribute this? If you did a straight copy (through filesystem or FTP) it's possible that the system tried to help you by downloading only the changed parts or whatever, which it frequently tries to do when the file with the same name is sent to the same location more than once. Of course it fails - this kind of diff patching may have worked fine in the past, but it was for use by those who had both old and new versions of the file at hand, and created a patch to bridge the differences between exactly these two. M$ somehow thinks it can diff a file with one it doesn't have yet, and fails a lot, driving me nuts. Perhaps it saved a few seconds, but wasted dozens of my minutes.
So the way to safely (!) (safe from OS meddling) copy a file from anywhere to a Windows box nowadays is to zip it - and into a zip with a new name each time. I routinely give it same name with changing number in the end, i.e. pack01.zip, pack02.zip... and couple of times a year I forget to do so and then lose more hair...