<?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: Default Libname using &amp;quot;\.&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743664#M232875</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/252152"&gt;@theponcer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the reply. Here's the error message:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;24         libname out '.\sas_data_sets\PBP';
NOTE: Library OUT does not exist.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is an odd message.&amp;nbsp; It's not an error per se but rather is just a note.&amp;nbsp; I think it means that whatever your current working directory is that there is no set of sub folders "sas_data_sets\PBP".&amp;nbsp; In other words, if your current working directory is "C:\Windows" there is no path&amp;nbsp;"C:\Windows\sas_data_sets\PBP".&amp;nbsp; I&amp;nbsp;&lt;EM&gt;think&amp;nbsp;&lt;/EM&gt;that's what the message means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know what directory you want to use, but just as an example, let's say it's X:\sastemp.&amp;nbsp; Try this snippet of code (after changing it to the directory you really want to use)&amp;nbsp;&lt;EM&gt;before&lt;/EM&gt; your Libname.&amp;nbsp; Make sure that subfolders&amp;nbsp;"sas_data_sets\PBP" exist before you run your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let RC = %sysfunc(dlgcdir("X:\sastemp"));
%PUT  NOTE:  &amp;amp;=RC;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
    <pubDate>Tue, 25 May 2021 18:51:02 GMT</pubDate>
    <dc:creator>jimbarbour</dc:creator>
    <dc:date>2021-05-25T18:51:02Z</dc:date>
    <item>
      <title>Default Libname using "\."</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743619#M232853</link>
      <description>&lt;P&gt;I have several SAS programs from an external source that I am not sure how to interpret/modify. Each has a statement similar to the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname out '.\sas_data_sets\output';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I run the code, I get an error telling me that the libname is not defined. I would rather not open each file, change the libnames to what I want them to be, save, and run. Is the "." supposed to refer to some default file path? If so, how do I assign this default file path?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If not, I guess I can manually change.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 16:40:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743619#M232853</guid>
      <dc:creator>theponcer</dc:creator>
      <dc:date>2021-05-25T16:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Default Libname using "\."</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743625#M232855</link>
      <description>&lt;P&gt;The single dot in a Windows path name refers to the current folder, which in SAS 9.4 can be seen at the bottom left of the SAS 9.4 window, as shown here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 518px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59730iB7872253E42E0B0A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So your LIBNAME refers to a subfolder named &lt;FONT face="courier new,courier"&gt;\sas_data_sets\output&lt;/FONT&gt; within the current folder shown. Is that what you want?&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 16:49:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743625#M232855</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-25T16:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: Default Libname using "\."</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743626#M232856</link>
      <description>&lt;P&gt;Can you show the exact error message?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One option is to set a Path macro variable in the top portion of the program and then all the other portions of the program "inherit" this value.&amp;nbsp; You set it once in the beginning of the program, and that's it.&amp;nbsp; Alternatively, you could create a parameter file or if you're executing in batch mode (as in a "production" type SAS job), you can pass the path in as a parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;%LET Path = x:\my_dir\my_project;

libname out "&amp;amp;Path\sas_data_sets\output";&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 16:49:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743626#M232856</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-05-25T16:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Default Libname using "\."</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743630#M232859</link>
      <description>&lt;P&gt;Yep, that's what I want. Thanks for the explanation! I'm in SAS EG, so I'm not seeing the default folder pictured above. Is there a corollary for this version, or am I stuck?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;24         proc setinit;
25         quit;

Original site validation data
Current version: 9.04.01M6P110718
Operating System:   WX64_SV .
Product expiration dates:
---Base SAS Software                                                                                    30DEC2021 (CPU A) 
---SAS/STAT                                                                                             30DEC2021 (CPU A) 
---SAS/GRAPH                                                                                            30DEC2021 (CPU A) 
---SAS Integration Technologies                                                                         30DEC2021 (CPU A) 
---SAS/Secure 168-bit                                                                                   30DEC2021 (CPU A) 
---SAS/Secure Windows                                                                                   30DEC2021 (CPU A) 
---SAS Enterprise Guide                                                                                 30DEC2021 (CPU A) 
---SAS/ACCESS Interface to PC Files                                                                     30DEC2021 (CPU A) 
---SAS/ACCESS Interface to ODBC                                                                         30DEC2021 (CPU A) 
---SAS Workspace Server for Local Access                                                                30DEC2021 (CPU A) 
---High Performance Suite                                                                               30DEC2021 (CPU A) 
---SAS Add-in for Microsoft Excel                                                                       30DEC2021 (CPU A) 
---SAS Add-in for Microsoft Outlook                                                                     30DEC2021 (CPU A) 
---SAS Add-in for Microsoft PowerPoint                                                                  30DEC2021 (CPU A) 
---SAS Add-in for Microsoft Word                                                                        30DEC2021 (CPU A) &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 25 May 2021 16:59:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743630#M232859</guid>
      <dc:creator>theponcer</dc:creator>
      <dc:date>2021-05-25T16:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Default Libname using "\."</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743631#M232860</link>
      <description>&lt;P&gt;Thanks for the reply. Here's the error message:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;24         libname out '.\sas_data_sets\PBP';
NOTE: Library OUT does not exist.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;That solution works, but then I would have to manually change each libname statement to match the below, which is what I'm trying to avoid.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 17:01:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743631#M232860</guid>
      <dc:creator>theponcer</dc:creator>
      <dc:date>2021-05-25T17:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Default Libname using "\."</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743632#M232861</link>
      <description>&lt;P&gt;This blog posts covers the topic, and shows you how to change the default directory. It should work in EG.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://blogs.sas.com/content/sasdummy/2018/08/28/sas-current-directory/" target="_blank" rel="noopener"&gt;https://blogs.sas.com/content/sasdummy/2018/08/28/sas-current-directory/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 17:06:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743632#M232861</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-05-25T17:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Default Libname using "\."</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743660#M232873</link>
      <description>&lt;P&gt;Enterprise Guide is the problem (or really any method of running SAS that does involve calling it from the command line).&amp;nbsp; &amp;nbsp;That style of indirect reference works well when you can navigate to the project directory and run your SAS code from there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have access to run operating system commands you can use the cd command to change the current directory.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile "cd /myproject/directory" pipe;
  input;
  put _infile_;
run;
libname mydate './my_subdir';
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But you might as well just set a macro variable and reference that.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let topnode=/myproject/directory ;
libname mydate "&amp;amp;topnode/my_subdir";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also note that if you are running SAS on a different machine than where Enterprise Guide is running (which is the normal reason for using Enterprise Guide) then you need to make sure the TOPNODE is actually visible from the machine where your SAS is running.&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 18:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743660#M232873</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-25T18:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Default Libname using "\."</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743664#M232875</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/252152"&gt;@theponcer&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks for the reply. Here's the error message:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;24         libname out '.\sas_data_sets\PBP';
NOTE: Library OUT does not exist.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is an odd message.&amp;nbsp; It's not an error per se but rather is just a note.&amp;nbsp; I think it means that whatever your current working directory is that there is no set of sub folders "sas_data_sets\PBP".&amp;nbsp; In other words, if your current working directory is "C:\Windows" there is no path&amp;nbsp;"C:\Windows\sas_data_sets\PBP".&amp;nbsp; I&amp;nbsp;&lt;EM&gt;think&amp;nbsp;&lt;/EM&gt;that's what the message means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know what directory you want to use, but just as an example, let's say it's X:\sastemp.&amp;nbsp; Try this snippet of code (after changing it to the directory you really want to use)&amp;nbsp;&lt;EM&gt;before&lt;/EM&gt; your Libname.&amp;nbsp; Make sure that subfolders&amp;nbsp;"sas_data_sets\PBP" exist before you run your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let RC = %sysfunc(dlgcdir("X:\sastemp"));
%PUT  NOTE:  &amp;amp;=RC;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 18:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Default-Libname-using-quot-quot/m-p/743664#M232875</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2021-05-25T18:51:02Z</dc:date>
    </item>
  </channel>
</rss>

