<?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 Dataset getting locked mysteriously in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dataset-getting-locked-mysteriously/m-p/41904#M8602</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing an weird problem. I am creating a table from one process (sas session) and trying to delete that same table using a second process (sas session). These sas sessions are getting called using Java from interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the second process when I am trying to delete the dataset it is telling that &lt;STRONG&gt;ERROR: Delete lock is not available for TMPLIB.SPOT_STATUS.DATA, lock held by another process.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But we are not locking this table in anywhere. The code used for deletion is: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc datasets library=tmplib;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete spot_status;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest a solution. Is it possible that some external process is locking the table and if yes then is there a way to track that process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Thanks &amp;amp; Regards,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Saugata Mukherjee.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jan 2012 11:02:54 GMT</pubDate>
    <dc:creator>Saugata</dc:creator>
    <dc:date>2012-01-31T11:02:54Z</dc:date>
    <item>
      <title>Dataset getting locked mysteriously</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dataset-getting-locked-mysteriously/m-p/41904#M8602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am facing an weird problem. I am creating a table from one process (sas session) and trying to delete that same table using a second process (sas session). These sas sessions are getting called using Java from interface.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now in the second process when I am trying to delete the dataset it is telling that &lt;STRONG&gt;ERROR: Delete lock is not available for TMPLIB.SPOT_STATUS.DATA, lock held by another process.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;But we are not locking this table in anywhere. The code used for deletion is: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc datasets library=tmplib;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete spot_status;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; quit;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest a solution. Is it possible that some external process is locking the table and if yes then is there a way to track that process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Thanks &amp;amp; Regards,&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Saugata Mukherjee.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 11:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dataset-getting-locked-mysteriously/m-p/41904#M8602</guid>
      <dc:creator>Saugata</dc:creator>
      <dc:date>2012-01-31T11:02:54Z</dc:date>
    </item>
    <item>
      <title>Dataset getting locked mysteriously</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dataset-getting-locked-mysteriously/m-p/41905#M8603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how&amp;nbsp; do you ensure the creation is complete (and table closed) before second session attempts the delete?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 12:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dataset-getting-locked-mysteriously/m-p/41905#M8603</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2012-01-31T12:29:05Z</dc:date>
    </item>
    <item>
      <title>Dataset getting locked mysteriously</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dataset-getting-locked-mysteriously/m-p/41906#M8604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; What library engine is being used?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are a number of ways in which to avoid this error and have a program wait for a lock to become available.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is one example paper that outlines a macro call %trylock&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 14pt; font-family: Arial,Bold;"&gt;&lt;STRONG style="font-size: 14pt; font-family: Arial,Bold;"&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Play Nice with Others: Waiting for a Lock on SAS Table&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.lexjansen.com/pharmasug/2005/posters/po33.pdf"&gt;http://www.lexjansen.com/pharmasug/2005/posters/po33.pdf&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jan 2012 19:57:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dataset-getting-locked-mysteriously/m-p/41906#M8604</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2012-01-31T19:57:49Z</dc:date>
    </item>
  </channel>
</rss>

