<?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: Close table in another session in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271177#M53949</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/86012"&gt;@Jpep&lt;/a&gt; wrote:&lt;BR /&gt;That would work since I am replacing the table anyway. We have tried proc delete commands and it does not work since it is someone else's session.&lt;BR /&gt;What operating system commands should we attempt?&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This depends on the operating system that SAS is installed on. If it is UNIX, I can provide a macro that physically deletes a dataset no matter what.&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2016 05:23:14 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-05-18T05:23:14Z</dc:date>
    <item>
      <title>Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271037#M53916</link>
      <description>&lt;P&gt;I have scheduled code that makes the same table each night, which is shared. Some people accidentally leave the table open - then it does not update.&lt;/P&gt;&lt;P&gt;Is there a way in the code to close the table in someone else's session?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 17:24:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271037#M53916</guid>
      <dc:creator>Jpep</dc:creator>
      <dc:date>2016-05-17T17:24:29Z</dc:date>
    </item>
    <item>
      <title>Re: Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271079#M53922</link>
      <description>&lt;P&gt;No.&lt;/P&gt;
&lt;P&gt;But you can use operating system commands to delete the file. At least in UNIX it is possible to remove a directory entry although the file is open.&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 19:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271079#M53922</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-17T19:46:49Z</dc:date>
    </item>
    <item>
      <title>Re: Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271089#M53923</link>
      <description>&lt;P&gt;The issue of sharing/opening SAS datasets while trying to also update them has been the subject of innumerable discussions over the years...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The bottom line is there is no easy answer but here are a few ways to deal with this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Move the table to a DBMS designed for multi-user updates&lt;/LI&gt;
&lt;LI&gt;Implement SAS/SHARE in your SAS environment &amp;nbsp;- requires a new SAS licence&lt;/LI&gt;
&lt;LI&gt;If all SAS users access the table via SAS metadata-controlled SAS sessions then stop and re-start your SAS metadata server each night before running your update job - this will kill all the processes locking the table&lt;/LI&gt;
&lt;LI&gt;Look at using OS commands and tools to identify who is locking the table and kill the offending SAS process&lt;/LI&gt;
&lt;LI&gt;Consider creating a SAS view of your table and only allow other users to access the view not the original table&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 17 May 2016 20:05:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271089#M53923</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-05-17T20:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271096#M53925</link>
      <description>That would work since I am replacing the table anyway. We have tried proc delete commands and it does not work since it is someone else's session.&lt;BR /&gt;What operating system commands should we attempt?&lt;BR /&gt;Thank you!&lt;BR /&gt;</description>
      <pubDate>Tue, 17 May 2016 20:35:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271096#M53925</guid>
      <dc:creator>Jpep</dc:creator>
      <dc:date>2016-05-17T20:35:12Z</dc:date>
    </item>
    <item>
      <title>Re: Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271100#M53926</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;: Just want to comment about SHARE, it allows for row level locking between users. Replacing a table requires a member lock. So I don't think that it will solve this particular problem.</description>
      <pubDate>Tue, 17 May 2016 20:39:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271100#M53926</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-05-17T20:39:56Z</dc:date>
    </item>
    <item>
      <title>Re: Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271141#M53941</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13674"&gt;@LinusH﻿&lt;/a&gt;. I've never used SAS/SHARE but I think depending on the update method being used this could work judging by what I see in this link (assuming of course that all users access the multi-user table via a SAS/SHARE server):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/shrref/64803/HTML/default/viewer.htm#p0iqymuxvfhhnjn1u7msnsiej9mm.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/shrref/64803/HTML/default/viewer.htm#p0iqymuxvfhhnjn1u7msnsiej9mm.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 May 2016 23:35:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271141#M53941</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2016-05-17T23:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271173#M53947</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;: as the information on that pages indicates that data statement without modify requires a member lock. The same goes for SQL create table statement. &lt;BR /&gt;SHARE would help if the OP rewrites the logic to update the table in place instead. Probably this is more complicated an and awkward if the end goal is to replace all observations.</description>
      <pubDate>Wed, 18 May 2016 05:10:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271173#M53947</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-05-18T05:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271177#M53949</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/86012"&gt;@Jpep&lt;/a&gt; wrote:&lt;BR /&gt;That would work since I am replacing the table anyway. We have tried proc delete commands and it does not work since it is someone else's session.&lt;BR /&gt;What operating system commands should we attempt?&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;This depends on the operating system that SAS is installed on. If it is UNIX, I can provide a macro that physically deletes a dataset no matter what.&lt;/P&gt;</description>
      <pubDate>Wed, 18 May 2016 05:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271177#M53949</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-05-18T05:23:14Z</dc:date>
    </item>
    <item>
      <title>Re: Close table in another session</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271406#M53988</link>
      <description>We have Windows on Intel 64-bit OS.</description>
      <pubDate>Wed, 18 May 2016 13:50:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Close-table-in-another-session/m-p/271406#M53988</guid>
      <dc:creator>Jpep</dc:creator>
      <dc:date>2016-05-18T13:50:14Z</dc:date>
    </item>
  </channel>
</rss>

