<?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: Store librefs in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297320#M62410</link>
    <description>&lt;P&gt;The "Enable at Startup" can only be specified when you create a new library from the SAS Explorer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This information is stored in the SAS Registry (stored in the SASUSER library).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend the approach using a SAS program, since this is portable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
    <pubDate>Fri, 09 Sep 2016 07:58:03 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2016-09-09T07:58:03Z</dc:date>
    <item>
      <title>Store librefs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297311#M62405</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dear community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this time, I would like to ask for your help concerning the following administrative issue:&lt;/P&gt;&lt;P&gt;Now it happened to me three times (after using SAS for ~ five months) that when I open SAS, all my librefs (Explorer View: SAS Environment → Libraries →) where gone.&lt;/P&gt;&lt;P&gt;Am I somehow able to story something like a “profile”, such that I do not have to manually add all old libraries again?&lt;/P&gt;&lt;P&gt;Or, is there are a way to (if I am capable of restoring all locations manually) to write all librefs to a file, such that, if they happen to "vanish" once again, I could recreate them with a SAS-command?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would be glad, if you could help me with this issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours sincerely,&lt;/P&gt;&lt;P&gt;Sinistrum&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 06:36:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297311#M62405</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2016-09-09T06:36:08Z</dc:date>
    </item>
    <item>
      <title>Re: Store librefs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297313#M62407</link>
      <description>&lt;P&gt;SAS Libraries are created using the LIBNAME statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So all you need to do is, save all the LIBNAME statements to a SAS program and run it when you start SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Depending on your SAS Environment (SAS University Edition, SAS Installation on your PC, SAS Platform Installation) there might be other options.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 06:43:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297313#M62407</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2016-09-09T06:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: Store librefs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297318#M62409</link>
      <description>&lt;P&gt;Hello Bruno,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for your fast reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Up untill now, I did not use a LIBNAME state.&lt;/P&gt;&lt;P&gt;I just right-clicked "libraries" and created a new library. With this method, one can use "enable on start up" and everything should be fine, I thought.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, for now, I use the method suggested by you: I create a program and put all the libname statements in it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to make them "enabled on startup"?&lt;/P&gt;&lt;P&gt;If I right-lick them in the explorer view, there is no option causing them to be loaded when SAS is started.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sinistrum&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:25:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297318#M62409</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2016-09-09T07:25:06Z</dc:date>
    </item>
    <item>
      <title>Re: Store librefs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297320#M62410</link>
      <description>&lt;P&gt;The "Enable at Startup" can only be specified when you create a new library from the SAS Explorer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This information is stored in the SAS Registry (stored in the SASUSER library).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I recommend the approach using a SAS program, since this is portable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 07:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297320#M62410</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2016-09-09T07:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: Store librefs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297332#M62411</link>
      <description>&lt;P&gt;Find your autoexec file and add your librefs there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code should show you where your autoexec file is located&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let autox = %str(%sysfunc(getoption(autoexec)));
 %put &amp;amp;autox;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If it's blank you don't have one but you can set one up.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/hostwin/67962/HTML/default/viewer.htm#p0bmj7wjme32ayn1h4wim7trkhp6.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/hostwin/67962/HTML/default/viewer.htm#p0bmj7wjme32ayn1h4wim7trkhp6.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;I would also store a copy elsewhere since something appears to reset your settings.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 08:45:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297332#M62411</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-09-09T08:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Store librefs</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297344#M62417</link>
      <description>&lt;P&gt;First of all: Thank you both for responding. I was really in panic this morning; when this first happened to me, I thought, all my data was gone. But now, I assume, that somehow, "just" the settings are reset, as suggested by Reeza (spoiler for my "theory" on this issue).&lt;/P&gt;&lt;LI-SPOILER&gt;Sometimes, I, accidentally, double-double-click SAS.exe in order to open it. Then, the "first" SAS.exe would operate normally, the "second" SAS.exe would not have access to the settings, because the "first" SAS is using them. Then, I conveniently close the second SAS and everything works fine.&lt;BR /&gt;But maybe, sometimes I double-double-click too fast - then, the settings are corrupted at all.&lt;BR /&gt;&lt;BR /&gt;What I would like to add, is the following:&lt;BR /&gt;In addition, other settings are overwritten; e.g., I have it set in general, that, instead of variable-labels, I have variable-names displayed in tableview. This setting I adjust via &lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#n1otloofcbwkpnn1sfkrhh9zjl74.htm" target="_self"&gt;this &lt;/A&gt;instruction, is also gone.&lt;/LI-SPOILER&gt;&lt;P&gt;So, Reeza's answer is exactly what I was looking for.&lt;/P&gt;&lt;P&gt;Indeed, "it was blank", so I created an "autoexec.sas" with the txt.-editor and stored it in my "current folder" and it worked perfectly.&lt;/P&gt;&lt;P&gt;To combine, I take the solution by Bruno and create a file with all librefs-statements. This is taken aside, as recommended by Reeza.&lt;/P&gt;&lt;P&gt;The content of that very file is pasted into - the now existing - "autoexec.sas"&amp;nbsp; in my "current folder".&lt;/P&gt;&lt;P&gt;Such, if it happens again (which, as I hope, should not, for I know have an autoexec.sas, but, who knows), I have a back up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, once again, thank you very much indeed.&lt;/P&gt;&lt;P&gt;It is always a horror to see all the libraries vanished.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sinistrum&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2016 09:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Store-librefs/m-p/297344#M62417</guid>
      <dc:creator>Sinistrum</dc:creator>
      <dc:date>2016-09-09T09:57:22Z</dc:date>
    </item>
  </channel>
</rss>

