<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Solving the error: A lock is not available for &amp;lt;dataset&amp;gt; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667910#M200107</link>
    <description>This happens when the dataset you are trying to generate is already there and again you are running it to generate it but this time either you or someone else has opened it and it is unable to overwrite the opened dataset. In order to avoid this, the opened dataset has to be closed and the code for the same has to be run again.</description>
    <pubDate>Wed, 08 Jul 2020 23:00:12 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2020-07-08T23:00:12Z</dc:date>
    <item>
      <title>Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667905#M200105</link>
      <description>&lt;P&gt;The log just returned the following error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: &lt;STRONG&gt;A lock is not available for CCO_AREA.CCO_PCPCH_PROV_INTERLEAVED.DATA&lt;/STRONG&gt;.&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;NOTE: There were 1 observations read from the data set CCO_AREA.CCO_WITH_PCPCH.&lt;BR /&gt;NOTE: There were 1 observations read from the data set CCO_AREA.PROV_IN_STATE_W_NPI_ADDRESS.&lt;BR /&gt;&lt;STRONG&gt;WARNING&lt;/STRONG&gt;: The data set CCO_AREA.CCO_PCPCH_PROV_INTERLEAVED was only partially opened and will not be saved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have never gotten this error before.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can it be resolved?&lt;/P&gt;
&lt;P&gt;Thank you for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wlierman&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2020 22:53:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667905#M200105</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2020-07-08T22:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667910#M200107</link>
      <description>This happens when the dataset you are trying to generate is already there and again you are running it to generate it but this time either you or someone else has opened it and it is unable to overwrite the opened dataset. In order to avoid this, the opened dataset has to be closed and the code for the same has to be run again.</description>
      <pubDate>Wed, 08 Jul 2020 23:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667910#M200107</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-07-08T23:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667921#M200110</link>
      <description>If you are using SAS Enterprise Guide, go to Tools &amp;gt; View Open Data Sets, from there you can close any of the open datasets listed.</description>
      <pubDate>Thu, 09 Jul 2020 00:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667921#M200110</guid>
      <dc:creator>sustagens</dc:creator>
      <dc:date>2020-07-09T00:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667940#M200119</link>
      <description>&lt;P&gt;If your SAS server runs on Unix then this article by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp; might be helpful:&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Avoiding-the-dreaded-quot-Dataset-is-locked-quot-ERROR/ta-p/653210" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Avoiding-the-dreaded-quot-Dataset-is-locked-quot-ERROR/ta-p/653210&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 03:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667940#M200119</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-07-09T03:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667959#M200127</link>
      <description>Hello,&lt;BR /&gt;The SAS server is located on Windows.Thanks.&lt;BR /&gt;wlierman&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jul 2020 05:47:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667959#M200127</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2020-07-09T05:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667960#M200128</link>
      <description>Thanks.&amp;nbsp; I am working in a Windows environment with base SAS.&lt;BR /&gt;Is there a quick fix like that for SAS in Windows?&lt;BR /&gt;wlierman&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 09 Jul 2020 05:49:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667960#M200128</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2020-07-09T05:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667963#M200131</link>
      <description>&lt;P&gt;You say you work with a Windows&amp;nbsp;&lt;EM&gt;server&lt;/EM&gt;. How do you access that?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 06:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667963#M200131</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-07-09T06:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667964#M200132</link>
      <description>&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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, ....)&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2020 06:21:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667964#M200132</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-07-09T06:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667967#M200135</link>
      <description>Thanks Patrick.</description>
      <pubDate>Thu, 09 Jul 2020 06:38:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/667967#M200135</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2020-07-09T06:38:46Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/668651#M200465</link>
      <description>&lt;P&gt;Hi Jagadishkatam,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I took your advice but rebooted and the problem was resolved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wlierman&lt;/P&gt;</description>
      <pubDate>Sun, 12 Jul 2020 15:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/668651#M200465</guid>
      <dc:creator>wlierman</dc:creator>
      <dc:date>2020-07-12T15:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/825509#M326073</link>
      <description>Another cause of this error is something outside of SAS locking the file. If you are storing a large permanent SAS data set on a cloud server such as DropBox and trying to read/write to it often, the cloud service may have the file locked while it is pushing it to the cloud. For example, I've run into this when running a bootstrap routine that was trying to save iterations to a permanent data set on a cloud server and also when trying to sequentially update a large permanent data set multiple times during a SAS program. The solution is to just read/write everything locally and not save to the cloud based server until the end of the program.</description>
      <pubDate>Tue, 26 Jul 2022 19:10:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/825509#M326073</guid>
      <dc:creator>bprice</dc:creator>
      <dc:date>2022-07-26T19:10:43Z</dc:date>
    </item>
    <item>
      <title>Re: Solving the error: A lock is not available for &lt;dataset&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/897834#M354855</link>
      <description>&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can check to see what files are in use by your system and terminate/kill those processes by process ID's.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On Windows Servers, you have to install the&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/sysinternals/downloads/handle" target="_self"&gt;Handle.exe&lt;/A&gt;&amp;nbsp;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;It is highly likely this will damage the file, however, we can delete the file and replace it with SAS Data Integration Studio&lt;/STRONG&gt;&lt;STRONG&gt;.&lt;/STRONG&gt; 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.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Oct 2023 16:06:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Solving-the-error-A-lock-is-not-available-for-lt-dataset-gt/m-p/897834#M354855</guid>
      <dc:creator>gregorywpower</dc:creator>
      <dc:date>2023-10-09T16:06:42Z</dc:date>
    </item>
  </channel>
</rss>

