<?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: Lock not available for a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625759#M184483</link>
    <description>&lt;P&gt;1. How is library LIB defined?&lt;/P&gt;
&lt;P&gt;2. The code does not match the message. There is no table LIB.X in your code.&lt;/P&gt;</description>
    <pubDate>Wed, 19 Feb 2020 02:26:09 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-02-19T02:26:09Z</dc:date>
    <item>
      <title>Lock not available for a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625754#M184481</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running below query but I get an ERROR Lock not available . Can anyone please help .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;libname&amp;nbsp;mylib &amp;nbsp;'serverY\DATA\TEST';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PROC SQL ;&lt;BR /&gt;CONNECT TO ODBC (DATAsrc=XXXX USER = XXX PASSWORD = XXX);&lt;BR /&gt;CREATE TABLE mylib.Apple AS&lt;BR /&gt;&amp;nbsp;SELECT * FROM CONNECTION TO ODBC&lt;BR /&gt;&amp;nbsp; (&lt;BR /&gt;Select account,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; member&lt;/P&gt;&lt;P&gt;from database.table d&lt;BR /&gt;);&lt;BR /&gt;quit;&lt;/P&gt;&lt;P&gt;NOTE : Table&amp;nbsp;mylib.Apple created with 100 rows and 20 columns&lt;/P&gt;&lt;P&gt;data mylib.Apple;&lt;BR /&gt;SET mylib.Apple;&lt;BR /&gt;RUN;&lt;/P&gt;&lt;P&gt;ERROR: A lock is not available from mylib.Apple&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 03:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625754#M184481</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2020-02-19T03:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: Lock not available for a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625759#M184483</link>
      <description>&lt;P&gt;1. How is library LIB defined?&lt;/P&gt;
&lt;P&gt;2. The code does not match the message. There is no table LIB.X in your code.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 02:26:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625759#M184483</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-02-19T02:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Lock not available for a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625798#M184503</link>
      <description>&lt;P&gt;Steps like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data mylib.Apple;
SET mylib.Apple;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;are always dangerous in several aspects. Create a new dataset.&lt;/P&gt;
&lt;P&gt;You might get a timing problem in your network share, so that it "thinks" the file is still open when SAS has in fact finished writing to it. Welcome to the world of Windoze.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 08:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625798#M184503</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-19T08:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Lock not available for a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625805#M184505</link>
      <description>&lt;P&gt;LIB is a probably a non-SAS library. As there is no reply we'll never know...&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 09:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625805#M184505</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-02-19T09:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Lock not available for a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625810#M184508</link>
      <description>&lt;P&gt;Its just an example I have it there for library name mylib&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 09:52:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625810#M184508</guid>
      <dc:creator>hexx18</dc:creator>
      <dc:date>2020-02-19T09:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: Lock not available for a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625811#M184509</link>
      <description>&lt;P&gt;The OP was edited, and the libname seems to point to a UNC network share.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 09:53:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625811#M184509</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-19T09:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: Lock not available for a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625812#M184510</link>
      <description>&lt;P&gt;The engine and/or path used for your target library is &lt;EM&gt;crucial&lt;/EM&gt; in determining the probable cause for your problem. But the momentary solution is to not overwrite the source dataset in one step, as I already mentioned, and this is also proper coding technique.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 09:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625812#M184510</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-19T09:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Lock not available for a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625979#M184574</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;It doesn't even look like a UNC path either.&lt;/P&gt;
&lt;P&gt;It looks like a game of "I give incomplete information with typos and mismatches but please solve my problem".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/90432"&gt;@hexx18&lt;/a&gt;&amp;nbsp; As described, it's really weird and Kurt's explanation is plausible.&lt;/P&gt;
&lt;P&gt;Or Maybe adding a disconnect would help?&lt;/P&gt;
&lt;P&gt;If not, as a workaround and until a better solution is found, don't overwrite the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Feb 2020 20:39:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Lock-not-available-for-a-dataset/m-p/625979#M184574</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-02-19T20:39:00Z</dc:date>
    </item>
  </channel>
</rss>

