<?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 Format of libname statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Format-of-libname-statement/m-p/297612#M62528</link>
    <description>&lt;DIV class="sasSource"&gt;Hi, friends&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp; When I type libname statement, it gives me this problem&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;90 Options PS = 56 LS =78;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;91 Libname stat480 '/folders/myshortcuts/S2/STAT480.sas';&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;ERROR: Library STAT480 is not in a valid format for access method RANDOM.&lt;/DIV&gt;
&lt;DIV class="sasError focus-line"&gt;ERROR: Error in the LIBNAME statement.&lt;/DIV&gt;
&lt;DIV class="sasError focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError focus-line"&gt;How do I fix this problem.&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Fri, 08 Feb 2019 18:09:26 GMT</pubDate>
    <dc:creator>zibinkevingao</dc:creator>
    <dc:date>2019-02-08T18:09:26Z</dc:date>
    <item>
      <title>Format of libname statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-of-libname-statement/m-p/297612#M62528</link>
      <description>&lt;DIV class="sasSource"&gt;Hi, friends&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp; When I type libname statement, it gives me this problem&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;90 Options PS = 56 LS =78;&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;91 Libname stat480 '/folders/myshortcuts/S2/STAT480.sas';&lt;/DIV&gt;
&lt;DIV class="sasSource"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError"&gt;ERROR: Library STAT480 is not in a valid format for access method RANDOM.&lt;/DIV&gt;
&lt;DIV class="sasError focus-line"&gt;ERROR: Error in the LIBNAME statement.&lt;/DIV&gt;
&lt;DIV class="sasError focus-line"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="sasError focus-line"&gt;How do I fix this problem.&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Feb 2019 18:09:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-of-libname-statement/m-p/297612#M62528</guid>
      <dc:creator>zibinkevingao</dc:creator>
      <dc:date>2019-02-08T18:09:26Z</dc:date>
    </item>
    <item>
      <title>Re: libname format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Format-of-libname-statement/m-p/297614#M62530</link>
      <description>&lt;P&gt;A &lt;A title="link to SAS documentation" href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=n1nk65k2vsfmxfn1wu17fntzszbp.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;LIBNAME should point to a directory&lt;/A&gt; containing SAS datasets. It looks like yours points to a SAS program. Something like this should work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Libname stat480 '/folders/myshortcuts/S2/';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A title="see the SAS documentation" href="https://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.4&amp;amp;docsetId=lestmtsglobal&amp;amp;docsetTarget=p05r9vhhqbhfzun1qo9mw64s4700.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Use the FILENAME statement&lt;/A&gt; when you need to reference a specific file, or a directory for the purposes of reading or writing files that&amp;nbsp;&lt;STRONG&gt;are not&lt;/STRONG&gt; SAS data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename stat480&amp;nbsp;'/folders/myshortcuts/S2/'; 

/* include and run a program from the folder */ 
%include stat480(STAT480.sas); 

data stat; &amp;nbsp; 
  /* read a CSV file from the folder*/ &amp;nbsp; 
  infile stat480(data.csv); &amp;nbsp; 
  input v1 v2 ...; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;EM&gt;Editor's note: Popular topic! We added a few more examples and documentation links.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Feb 2019 18:24:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Format-of-libname-statement/m-p/297614#M62530</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2019-02-08T18:24:17Z</dc:date>
    </item>
  </channel>
</rss>

