- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The log just returned the following error:
ERROR: A lock is not available for CCO_AREA.CCO_PCPCH_PROV_INTERLEAVED.DATA.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 1 observations read from the data set CCO_AREA.CCO_WITH_PCPCH.
NOTE: There were 1 observations read from the data set CCO_AREA.PROV_IN_STATE_W_NPI_ADDRESS.
WARNING: The data set CCO_AREA.CCO_PCPCH_PROV_INTERLEAVED was only partially opened and will not be saved.
I have never gotten this error before.
How can it be resolved?
Thank you for your help.
wlierman
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Jag
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Jag
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jagadishkatam,
I took your advice but rebooted and the problem was resolved.
Thanks.
wlierman
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is there a quick fix like that for SAS in Windows?
wlierman
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You say you work with a Windows server. How do you access that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
If your SAS server runs on Unix then this article by @Kurt_Bremser might be helpful: https://communities.sas.com/t5/SAS-Communities-Library/Avoiding-the-dreaded-quot-Dataset-is-locked-q...
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The SAS server is located on Windows.Thanks.
wlierman
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
For SAS tables a process writing to a table locks it and any read access will lock the table for any other process trying to write to the table.
A table gets already locked for write access if you have it open somewhere - like if you've got two SAS sessions open with the table open.
There is no "fix" for that other than the person/session/process locking the table releasing it (i.e. closing the data grid in the session, libname blah clear, restart the SAS session, ....)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.