<?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: Can't clear a LIBNAME in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717859#M222069</link>
    <description>&lt;P&gt;From&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are not browsing one the datasets in the library? &lt;FONT color="#FF0000"&gt;None&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Did you open the library with any of the old SCL functions like OPEN() and forget to close it? &lt;FONT color="#FF0000"&gt;No&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you use the libref in some other options like FMTSEARCH that would keep the libref in use? &lt;FONT color="#FF0000"&gt;No&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you really need to write the library?&amp;nbsp; What happens if you initially define the libref with the ACCESS=READONLY option?&lt;FONT color="#FF0000"&gt; I do need write access.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;From&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;In addition to&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159" target="_blank"&gt;@Tom&lt;/A&gt;&lt;SPAN&gt;'s checklist add any SAS procedure that is accessing that library that requires a QUIT statement to exit. Examples are PROC SQL, PROC DATASETS. &lt;FONT color="#FF0000"&gt;I will check this, that sounds possible, I have written a very long macro, and it could be that somewhere in there I am missing a quit.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thought I had is that sometimes I have to stop the macro while it is running, so I hit the break icon. (This is usually because I have provided an incorrect argument somewhere, rather than bugs, which I think are few) Maybe that's where the issue comes in, and would explain why this is not repeatable. If that is a possibility, its not clear to me how to verify this or fix this, if you have any ideas, please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Feb 2021 11:47:05 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2021-02-09T11:47:05Z</dc:date>
    <item>
      <title>Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717106#M221740</link>
      <description>&lt;PRE&gt;1751  libname cam_dial clear;
ERROR: Unable to clear or re-assign the library CAM_DIAL because it is still in use.
ERROR: Error in the LIBNAME statement.

&lt;/PRE&gt;
&lt;P&gt;Why does this happen? I know that if I have a data set open from that library, I get this message, but I do not have any data set open. So what else could it be causing this ERROR?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I fix it? (The only solution I have found so far is to shut down SAS, which is often something I don't want to do just to clear a LIBNAME).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 16:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717106#M221740</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-05T16:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717155#M221747</link>
      <description>&lt;P&gt;What is the libname statement that defines the libref ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the client and server environment ? Display Manager, Enterprise Guide to remote server, SAS Studio ? Other ?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 17:50:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717155#M221747</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2021-02-05T17:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717170#M221751</link>
      <description>&lt;P&gt;Base SAS Version 9.4 TS1M5, although this has been happening infrequently for many years&lt;/P&gt;
&lt;P&gt;Windows 10 accessing folders on a server&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname cam_dial "G:\myfolder\indirect";
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The libname works when I assign it, and I can access all the SAS data sets in the folder. It's only when I try to clear the libname that I have the problem.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 18:45:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717170#M221751</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-05T18:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717179#M221757</link>
      <description>&lt;P&gt;I have a strong suspicion that this is a WINDOWS bug.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have very seldom had this happen with SAS libraries. But I fairly often have Windows tell me I can't delete a file, rename a data file "because the file is in use". If so, I really wish Windows would tell me what is using the file as the only application I know that I have open at the time are Windows Explorer and Outlook.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this hadn't been happening before I was required to move all of my work files to One-Drive I would think it might be some latency issue in One-Drive but this had happened with files on my local drive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The issue may persist until I shut down my computer where I would get a message about not shutting down because file xxx is in use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 19:09:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717179#M221757</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-05T19:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717181#M221759</link>
      <description>&lt;P&gt;I presume you are implying that this has ONLY happened when assigning a libname to a directory on a server.&amp;nbsp; I've certainly never had this problem in any context.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Even though the error message implies that it is SAS that is not properly monitoring libname usage, maybe there is a network status flag or configuration component that occasionally prevents SAS from doing its job.&amp;nbsp; It's a reach I know, but if there is a difference in behaviors between libnames assigned to local vs server directories, I have to ask.&amp;nbsp; BTW, I wouldn't have a clue as to how to dig into this.&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;
&lt;P&gt;&lt;STRIKE&gt;Presumably the network environment is such that SAS can't confirm the status of the&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;I would have no clue to a remedy but perhaps you can give some particulars about the network protocol and configuration.&lt;/STRIKE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 19:18:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717181#M221759</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-02-05T19:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717182#M221760</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;I can't rule that out, although the recent rash of occurrences of this issue corresponds with the same time period where I am using DOSUBL in a program. Coincidence? Could be ... but I'm still hoping to find the cause.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 19:17:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717182#M221760</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-05T19:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717184#M221762</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31461"&gt;@mkeintz&lt;/a&gt;&amp;nbsp;I only store SAS data sets on a server, so the problem could be related to the server. I have no clues about network configuration and protocol.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 19:18:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717184#M221762</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-05T19:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717188#M221765</link>
      <description>&lt;P&gt;Things to check.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are not browsing one the datasets in the library?&lt;/P&gt;
&lt;P&gt;Did you open the library with any of the old SCL functions like OPEN() and forget to close it?&lt;/P&gt;
&lt;P&gt;Did you use the libref in some other options like FMTSEARCH that would keep the libref in use?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you really need to write the library?&amp;nbsp; What happens if you initially define the libref with the ACCESS=READONLY option?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 19:33:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717188#M221765</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-02-05T19:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717225#M221777</link>
      <description>&lt;P&gt;In addition to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt; 's checklist add any SAS procedure that is accessing that library that requires a QUIT statement to exit. Examples are PROC SQL, PROC DATASETS.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2021 21:39:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717225#M221777</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-02-05T21:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717246#M221786</link>
      <description>Just to be certain, is G: mapped to a network share ?  If so, what kind of&lt;BR /&gt;machine or platform is hosting the share ?&lt;BR /&gt;</description>
      <pubDate>Fri, 05 Feb 2021 23:29:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717246#M221786</guid>
      <dc:creator>RichardDeVen</dc:creator>
      <dc:date>2021-02-05T23:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Can't clear a LIBNAME</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717859#M222069</link>
      <description>&lt;P&gt;From&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are not browsing one the datasets in the library? &lt;FONT color="#FF0000"&gt;None&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Did you open the library with any of the old SCL functions like OPEN() and forget to close it? &lt;FONT color="#FF0000"&gt;No&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you use the libref in some other options like FMTSEARCH that would keep the libref in use? &lt;FONT color="#FF0000"&gt;No&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you really need to write the library?&amp;nbsp; What happens if you initially define the libref with the ACCESS=READONLY option?&lt;FONT color="#FF0000"&gt; I do need write access.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;From&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13976"&gt;@SASKiwi&lt;/a&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;In addition to&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159" target="_blank"&gt;@Tom&lt;/A&gt;&lt;SPAN&gt;'s checklist add any SAS procedure that is accessing that library that requires a QUIT statement to exit. Examples are PROC SQL, PROC DATASETS. &lt;FONT color="#FF0000"&gt;I will check this, that sounds possible, I have written a very long macro, and it could be that somewhere in there I am missing a quit.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another thought I had is that sometimes I have to stop the macro while it is running, so I hit the break icon. (This is usually because I have provided an incorrect argument somewhere, rather than bugs, which I think are few) Maybe that's where the issue comes in, and would explain why this is not repeatable. If that is a possibility, its not clear to me how to verify this or fix this, if you have any ideas, please let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Feb 2021 11:47:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-t-clear-a-LIBNAME/m-p/717859#M222069</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-02-09T11:47:05Z</dc:date>
    </item>
  </channel>
</rss>

