<?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: Is there a simple way to find the old path for a broken library? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803421#M33332</link>
    <description>&lt;P&gt;I'd suggest that you&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;create a .sas file containing the appropriate LIBNAME statements, e.g.,&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
file 'C:\Temp\libnames.sas';
input libref $;
length path $1000;
path=tranwrd(pathname(libref), 'Z:\', 'W:\');
if path ne:'(' then path=quote(trim(path));
put 'libname ' libref path ';';
cards;
yourlib1
yourlib2
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;review that file (libname.sas) to make sure that all LIBNAME statements are correct&lt;/LI&gt;
&lt;LI&gt;%INCLUDE the file to submit the LIBNAME statements&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%inc 'C:\Temp\libnames.sas';&lt;/CODE&gt;&lt;/PRE&gt;
or copy the code from libnames.sas into your AUTOEXEC file so that the libraries are always made available at startup.&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Tue, 22 Mar 2022 18:31:23 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2022-03-22T18:31:23Z</dc:date>
    <item>
      <title>Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802780#M33284</link>
      <description>&lt;P&gt;Several libraries I work with were stored on a network drive.&amp;nbsp; That drive was failing, so our network services group moved my directories to another drive in the system.&amp;nbsp; Now my libraries are broken in SAS.&amp;nbsp; When I try to get properties it says it doesn't exist.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;I just need the path name SAS thinks it wants and I can easily repair the connection, but some of them will take some time to reconstruct if I have to figure it out manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there an easy way to pull up this information?&amp;nbsp; A config file or something?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 12:57:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802780#M33284</guid>
      <dc:creator>iiibbb</dc:creator>
      <dc:date>2022-03-18T12:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802793#M33285</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have any previous SAS logs that you can refer to?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there any existing code where the paths are assigned to a library name?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you perform a textual search on your files?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks &amp;amp; kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 13:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802793#M33285</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2022-03-18T13:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802814#M33286</link>
      <description>There are no logs.  I have a few dozen libraries that were affected by the move.  I can search for the files/directories one by one, but it would be much faster if I could just see where SAS was trying to look for the library.  Instead it just says that the library no longer exists.  But there must be a path it was trying to follow.</description>
      <pubDate>Fri, 18 Mar 2022 14:43:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802814#M33286</guid>
      <dc:creator>iiibbb</dc:creator>
      <dc:date>2022-03-18T14:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802822#M33287</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you say "&lt;SPAN&gt;Instead &lt;U&gt;it&lt;/U&gt; just says that the library no longer exists&lt;/SPAN&gt;", is this a log? If it is a log, can you see if there is a path in the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If it is not a log then what is "it"? Please provide evidence either way, e.g., text from the (using the Insert Code icon "&amp;lt;/&amp;gt;") for a log or a screen shot in the case of a pop-up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the case of a log, ensure option &lt;FONT face="courier new,courier"&gt;source&lt;/FONT&gt; is on. Also, if macros are being used then it might be worth switching on the macro options &lt;FONT face="courier new,courier"&gt;mprint symbolgen&lt;/FONT&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Kind regards,&lt;/P&gt;
&lt;P&gt;Amir.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 15:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802822#M33287</guid>
      <dc:creator>Amir</dc:creator>
      <dc:date>2022-03-18T15:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802825#M33288</link>
      <description>&lt;P&gt;Where did you store the code that assigned libraries? Or how are your libraries assigned?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 15:17:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802825#M33288</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-18T15:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802829#M33289</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/6309"&gt;@iiibbb&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you know the &lt;EM&gt;librefs&lt;/EM&gt;, you can use the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lefunctionsref/p0sycvpqwxea06n1klcseze1mdak.htm" target="_blank" rel="noopener"&gt;PATHNAME function&lt;/A&gt; to obtain the corresponding paths.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
input libref $;
length path $1000;
path=pathname(libref);
put libref $9. path=;
cards;
maps
sasuser
work
yourlib
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Mar 2022 15:47:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802829#M33289</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-03-18T15:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802830#M33290</link>
      <description>&lt;P&gt;I assume you mean that you are trying to use a libref, like MYLIB, that is still pointing to the old location.&lt;/P&gt;
&lt;P&gt;To point MYLIB at the new location just run a new LIBNAME statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib '/path to new location';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But the question I have is how did the libref get defined?&lt;/P&gt;
&lt;P&gt;Did you run some SAS code, like the example libname statement above, to make the libref?&amp;nbsp; If so then update that program to use the right path.&lt;/P&gt;
&lt;P&gt;Did you somehow define the libref once and SAS is remembering it the next time you startup?&amp;nbsp; If so then you need to go back to the process you used to define the libref and re-define it.&lt;/P&gt;
&lt;P&gt;Or just add the code like above the redefine it now.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What interface are you using to run your SAS code?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you typing the a command at the command line?&amp;nbsp; Like&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;sas myfile.sas&lt;/PRE&gt;
&lt;P&gt;In that case look and see if your autoexec.sas file is running the libname command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you using Enterprise Guide?&lt;BR /&gt;Are you using SAS/Studio?&lt;/P&gt;
&lt;P&gt;Is your site using SAS Metadata Manager to push common librefs to every user?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2022 16:02:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/802830#M33290</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-18T16:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803392#M33328</link>
      <description>&lt;P&gt;First time I tried this it didn't work.&amp;nbsp; Didn't change anything and ran it again and it worked perfectly.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Go figure.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 17:07:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803392#M33328</guid>
      <dc:creator>iiibbb</dc:creator>
      <dc:date>2022-03-22T17:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803407#M33330</link>
      <description>&lt;P&gt;Follow up question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that I know the path names of these librefs, is there a simple way to change the pathname?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Literally all I need to do is change the Z: to a W:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.A" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;Z:\2016_SLXHD\1_SAS_DATA\TOUT_DOE\DOE_LEGS&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 17:35:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803407#M33330</guid>
      <dc:creator>iiibbb</dc:creator>
      <dc:date>2022-03-22T17:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803421#M33332</link>
      <description>&lt;P&gt;I'd suggest that you&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;create a .sas file containing the appropriate LIBNAME statements, e.g.,&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
file 'C:\Temp\libnames.sas';
input libref $;
length path $1000;
path=tranwrd(pathname(libref), 'Z:\', 'W:\');
if path ne:'(' then path=quote(trim(path));
put 'libname ' libref path ';';
cards;
yourlib1
yourlib2
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;review that file (libname.sas) to make sure that all LIBNAME statements are correct&lt;/LI&gt;
&lt;LI&gt;%INCLUDE the file to submit the LIBNAME statements&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%inc 'C:\Temp\libnames.sas';&lt;/CODE&gt;&lt;/PRE&gt;
or copy the code from libnames.sas into your AUTOEXEC file so that the libraries are always made available at startup.&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 22 Mar 2022 18:31:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803421#M33332</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2022-03-22T18:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a simple way to find the old path for a broken library?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803453#M33333</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/6309"&gt;@iiibbb&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Follow up question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that I know the path names of these librefs, is there a simple way to change the pathname?&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Literally all I need to do is change the Z: to a W:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;
&lt;TABLE class="table" summary="Procedure Print: Data Set WORK.A" frame="box" rules="all" cellspacing="0" cellpadding="5"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="l data"&gt;Z:\2016_SLXHD\1_SAS_DATA\TOUT_DOE\DOE_LEGS&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Wouldn't it just be easier to mount the new disk as Z instead of W?&amp;nbsp; Then the libref definition does not need to change.&amp;nbsp; Part of the reason to use mapped drives.&amp;nbsp; You can change the physical drive without having to change the logical name you use to reference it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or are their other folders that are still on the old W drive?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 20:26:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Is-there-a-simple-way-to-find-the-old-path-for-a-broken-library/m-p/803453#M33333</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-22T20:26:25Z</dc:date>
    </item>
  </channel>
</rss>

