<?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 File Path error &amp;quot;variable is not an object&amp;quot; in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/File-Path-error-quot-variable-is-not-an-object-quot/m-p/384377#M91772</link>
    <description>&lt;P&gt;A rather new SAS user when it comes to pulling in data. Here is the code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME yi 'path';&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; infile = yi.filename TERMSTR = LF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; length Year $6;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; input Year ForecastOut F25 T25;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error: Variable yi is not an object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file is a csv file exported from excel. I would use excel directly but it doesn't seem to work. SAS 9.2 on a unix server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I type the path directly it tells me the file cannot be found.&lt;/P&gt;</description>
    <pubDate>Mon, 31 Jul 2017 18:29:25 GMT</pubDate>
    <dc:creator>abak</dc:creator>
    <dc:date>2017-07-31T18:29:25Z</dc:date>
    <item>
      <title>File Path error "variable is not an object"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Path-error-quot-variable-is-not-an-object-quot/m-p/384377#M91772</link>
      <description>&lt;P&gt;A rather new SAS user when it comes to pulling in data. Here is the code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIBNAME yi 'path';&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; infile = yi.filename TERMSTR = LF;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; length Year $6;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; input Year ForecastOut F25 T25;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error: Variable yi is not an object&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The file is a csv file exported from excel. I would use excel directly but it doesn't seem to work. SAS 9.2 on a unix server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I type the path directly it tells me the file cannot be found.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 18:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Path-error-quot-variable-is-not-an-object-quot/m-p/384377#M91772</guid>
      <dc:creator>abak</dc:creator>
      <dc:date>2017-07-31T18:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: File Path error "variable is not an object"</title>
      <link>https://communities.sas.com/t5/SAS-Programming/File-Path-error-quot-variable-is-not-an-object-quot/m-p/384381#M91774</link>
      <description>&lt;P&gt;LIBNAME is used to define library of SAS datasets.&lt;/P&gt;
&lt;P&gt;INFILE is used without the equal (=) sign to assign external file to read.&lt;/P&gt;
&lt;P&gt;When you write 'infile=...' it is as if you want to assign value to a variable called infile.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, you have matched 3 different tools.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assume&amp;nbsp;&amp;nbsp;you menat to do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename yi  'path/filename'; 
 
data test; 
    infile  yi  TERMSTR = LF;
    length Year $6;
    input Year ForecastOut F25 T25; 
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Try to run it. In case of issues post your full log.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Jul 2017 18:43:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/File-Path-error-quot-variable-is-not-an-object-quot/m-p/384381#M91774</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2017-07-31T18:43:33Z</dc:date>
    </item>
  </channel>
</rss>

