Hi Grigore
>Please correct me if I am wrong, but I vaguely recall SET VIEW TO does not restore the sort order as it was at the creation moment.
No, when you create an environment view, the name of the controlling index tag is saved and, when the view is restored, the same index will be set.
I think you may be thinking about the record pointers (which are not saved) but both the Indexes in use, and any Relations that have been defined, are preserved and restored.
----
Regards
Andy Kramek