<?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: Libname in SAS Studio in SAS Studio</title>
    <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440747#M4742</link>
    <description>&lt;P&gt;In general, libnames are pointers to where your files are stored, not to a specific file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dirData = /folders/myfolders/;

libname travel "&amp;amp;dirData.";

data travel.golf;
infile "&amp;amp;dirData.Golf.dat";
input ... ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*Libnames can also be used to connect to an XLSX file, a database such as SQL server or Access DB, or specific file types such as SPSS data sets.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Feb 2018 03:14:39 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2018-02-28T03:14:39Z</dc:date>
    <item>
      <title>Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440690#M4734</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME travel "&amp;amp;dirOUT"; 
 
data travel.golf; 
infile '/foders/myfolders/Golf.dat'; 
input CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         LIBNAME travel "&amp;amp;dirOUT";
 WARNING: Apparent symbolic reference DIROUT not resolved.
 NOTE: Library TRAVEL does not exist.
 74         
 75         data travel.golf;
 76         infile '/foders/myfolders/Golf.dat';
 77         input CourseName $18. NumberOfHoles Par Yardage GreenFees;
 78         RUN;
 
 ERROR: Library TRAVEL does not exist.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 79         
 80         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 93         &lt;/PRE&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;The code was created by SAS 9.2 user,&lt;/P&gt;&lt;P&gt;and I hope to transform it to use in my SAS Studio.&lt;/P&gt;&lt;P&gt;The code and Log was as above.&lt;/P&gt;&lt;P&gt;Is anyone having some suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks very much!:)&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 22:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440690#M4734</guid>
      <dc:creator>jc3992</dc:creator>
      <dc:date>2018-02-27T22:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440691#M4735</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile '/foders/myfolders/Golf.dat'; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;sorry the above was what I edited for my SAS Studio.&lt;/P&gt;&lt;P&gt;The original was&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;LIBNAME travel "&amp;amp;dirOUT"; 
DATA travel.golf; 
   INFILE "&amp;amp;dirdata.Golf.dat"; 
   INPUT CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Feb 2018 22:55:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440691#M4735</guid>
      <dc:creator>jc3992</dc:creator>
      <dc:date>2018-02-27T22:55:48Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440692#M4736</link>
      <description>&lt;P&gt;You never declared a value for libout.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let dirout = /folders/myfolders/;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188695"&gt;@jc3992&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile '/foders/myfolders/Golf.dat'; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;sorry the above was what I edited for my SAS Studio.&lt;/P&gt;
&lt;P&gt;The original was&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;LIBNAME travel "&amp;amp;dirOUT"; 
DATA travel.golf; 
   INFILE "&amp;amp;dirdata.Golf.dat"; 
   INPUT CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 22:57:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440692#M4736</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-27T22:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440695#M4737</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME travel "&amp;amp;dirOUT"; 
%let dirout = /folders/myfolders/; 
data travel.golf; 
INFILE '/folders/myfolders/Golf.dat'; 
input CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It's not working though&lt;/P&gt;&lt;P&gt;Several attempts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dirout = /folders/myfolders/; 
LIBNAME travel "&amp;amp;dirOUT"; 
DATA travel.golf; 
   INFILE "&amp;amp;dirdata.Golf.dat"; 
   INPUT CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN; &lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME travel "&amp;amp;dirOUT"; 
%let dirout = /folders/myfolders/; 
DATA travel.golf; 
   INFILE "&amp;amp;dirdata.Golf.dat"; 
   INPUT CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN; &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Feb 2018 23:04:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440695#M4737</guid>
      <dc:creator>jc3992</dc:creator>
      <dc:date>2018-02-27T23:04:23Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440696#M4738</link>
      <description>&lt;P&gt;You can't create it AFTER you try and use it....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;LIBNAME&lt;/SPAN&gt; travel &lt;SPAN class="token string"&gt;"&amp;amp;dirOUT"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt; &amp;lt;- using it;
&lt;SPAN class="token macroname"&gt;%let&lt;/SPAN&gt; dirout &lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;folders&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;myfolders&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;  &amp;lt;- creating it;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reorder that....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/188695"&gt;@jc3992&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME travel "&amp;amp;dirOUT"; 
%let dirout = /folders/myfolders/; 
data travel.golf; 
INFILE '/folders/myfolders/Golf.dat'; 
input CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It's not working though&lt;/P&gt;
&lt;P&gt;Several attempts&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dirout = /folders/myfolders/; 
LIBNAME travel "&amp;amp;dirOUT"; 
DATA travel.golf; 
   INFILE "&amp;amp;dirdata.Golf.dat"; 
   INPUT CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;LIBNAME travel "&amp;amp;dirOUT"; 
%let dirout = /folders/myfolders/; 
DATA travel.golf; 
   INFILE "&amp;amp;dirdata.Golf.dat"; 
   INPUT CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 23:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440696#M4738</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-27T23:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440710#M4739</link>
      <description>&lt;P&gt;Make sure to define BOTH of your macro variables before using them.&lt;/P&gt;
&lt;P&gt;Or&amp;nbsp;easier still get rid of the macro variables and just type the paths directly into the LIBNAME and INFILE statements.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 00:52:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440710#M4739</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-28T00:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440718#M4740</link>
      <description>&lt;P&gt;D'oh!&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;is correct, you're creating DIROUT and using DIRDATA which is likely another issue, unless you intended to have two different macro variables.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 01:26:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440718#M4740</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-28T01:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440745#M4741</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname travel '/folders/myfolders/Golf.dat'; 
data travel.golf; 
infile '/folders/myfolders/Golf.dat'; 
input CourseName $18. NumberOfHoles Par Yardage GreenFees; 
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The LOG:&lt;/P&gt;&lt;PRE&gt;1          OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 72         
 73         libname travel '/folders/myfolders/Golf.dat';
 NOTE: Library TRAVEL does not exist.
 74         data travel.golf;
 75         infile '/folders/myfolders/Golf.dat';
 76         input CourseName $18. NumberOfHoles Par Yardage GreenFees;
 77         RUN;
 
 ERROR: Library TRAVEL does not exist.
 NOTE: The SAS System stopped processing this step because of errors.
 NOTE: DATA statement used (Total process time):
       real time           0.00 seconds
       cpu time            0.01 seconds
       
 
 78         
 79         OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 92         &lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Feb 2018 03:07:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440745#M4741</guid>
      <dc:creator>jc3992</dc:creator>
      <dc:date>2018-02-28T03:07:40Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440747#M4742</link>
      <description>&lt;P&gt;In general, libnames are pointers to where your files are stored, not to a specific file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let dirData = /folders/myfolders/;

libname travel "&amp;amp;dirData.";

data travel.golf;
infile "&amp;amp;dirData.Golf.dat";
input ... ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*Libnames can also be used to connect to an XLSX file, a database such as SQL server or Access DB, or specific file types such as SPSS data sets.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 03:14:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440747#M4742</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-02-28T03:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440782#M4743</link>
      <description>&lt;P&gt;Maxim 1: Read the documentation.&lt;/P&gt;
&lt;P&gt;The documentation for the libname statement has a clear pointer to the operating-system specific documentation (so-called SAS Companion) for what constitutes a library. There you will see that a library on a UNIX or Windows system is a &lt;EM&gt;directory&lt;/EM&gt;, not a &lt;EM&gt;file&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Still better, you should work through the tutorials for SAS UE, as that will clean up most of your problems before they arise, in this case &lt;A href="http://video.sas.com/detail/videos/sas-analytics-u/video/4005088074001/accessing-your-existing-data:-for-sas-university-edition?autoStart=true" target="_blank"&gt;http://video.sas.com/detail/videos/sas-analytics-u/video/4005088074001/accessing-your-existing-data:-for-sas-university-edition?autoStart=true&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 07:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440782#M4743</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-02-28T07:14:16Z</dc:date>
    </item>
    <item>
      <title>Re: Libname in SAS Studio</title>
      <link>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440938#M4744</link>
      <description>&lt;P&gt;Will try that.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2018 16:27:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Studio/Libname-in-SAS-Studio/m-p/440938#M4744</guid>
      <dc:creator>jc3992</dc:creator>
      <dc:date>2018-02-28T16:27:00Z</dc:date>
    </item>
  </channel>
</rss>

