Yes, the "sort in place" syntax is handy, but dangerous in this way. You can protect yourself by making the important data set read-only either in the file system, or by assigning the libname with ACCESS=READONLY.