For folks who find the above solutions unsatisfactory or you're wondering why LOCK LIBNAME LIST or LOCK LIBNAME QUERY is returning something to the effect of "You and nobody on your system is locking this dataset." and yet you run a PROC DATASET step and your files are still locked, you have more options. You can check to see what files are in use by your system and terminate/kill those processes by process ID's. For Unix Systems, you can use lsof -p | grep FILENAME which will spit out the process ID(s) using the file. You can kill that process with kill -v PROCESS_ID. On Windows Servers, you have to install the Handle.exe program onto your compute server. Then you must open up the command prompt and run the handle.exe file and feed it the name of the table/file you are attempting to access. Which will provide the process ID(s) using the file. You open up Windows Task Manager, go to Details, sort your process IDs, and then you can kill that process. It is highly likely this will damage the file, however, we can delete the file and replace it with SAS Data Integration Studio. Looking at the LIBNAME statement you can find where on your machine the file is and delete it. Then you use SAS Data Integration studio to recreate your corresponding library.
... View more