Good luck using SORT - someone will be here if there are questns. One suggestion - do not code the USING/GIVING form as this typically wastes resources. As an expirement, USING / GIVING might be ok, but usually there is sort pre-processing and/or post-processing so coding INPUT PROCEDURE and/or OUTPUT PROCEDURE performs better.
I copied it to my library and compiled the logical file no problem.
If a physical file was copied from one place to another place, it is a new physical file - Not a logical file. I believe there is still confusion between them. . .