<?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: ERROR: Physical file does not exist ( macro) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356827#M83726</link>
    <description>&lt;P&gt;Because i didn't know the statement. Now I know :-D.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and sorry for upper case.&lt;/P&gt;</description>
    <pubDate>Mon, 08 May 2017 10:58:33 GMT</pubDate>
    <dc:creator>adil256</dc:creator>
    <dc:date>2017-05-08T10:58:33Z</dc:date>
    <item>
      <title>ERROR: Physical file does not exist ( macro)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356802#M83711</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I create a variable to store the file directory in it in order to modify the path easier in the futur but when i run the sas code I get this error "ERROR: Physical file does not exist." It works perfectly when i refer the path in the Infile statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I begin my code with :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let path=H:\database\SAS\Txt_file\Database.txt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;then I import my txt file.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA MyDB;
             LENGTH
              ...
             FORMAT
              
              ...
             INFORMAT
               
              ...

            INFILE '&amp;amp;path'
                LRECL=584                             &lt;BR /&gt;                ENCODING="WLATIN1"
                DLM=';'
                MISSOVER
                DSD 
                firstobs=2;
            
INPUT
              ...
        RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;thank u in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 08:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356802#M83711</guid>
      <dc:creator>adil256</dc:creator>
      <dc:date>2017-05-08T08:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Physical file does not exist ( macro)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356803#M83712</link>
      <description>&lt;P&gt;Macro variable references do not resolve withing single quotes when called within a string literal.&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="token statement"&gt;INFILE&lt;/SPAN&gt; "&lt;SPAN class="token string"&gt;&amp;amp;path"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 08:30:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356803#M83712</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-05-08T08:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Physical file does not exist ( macro)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356804#M83713</link>
      <description>&lt;P&gt;Macro variables are not resolved when enclosed by single quotes. Use double quotes in your infile statement.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 08:30:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356804#M83713</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-05-08T08:30:29Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Physical file does not exist ( macro)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356805#M83714</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not just put it in a filename statement rather than juming through macro loops?:&lt;/P&gt;
&lt;PRE&gt;filename dbfile 'h:\database\sas\txt_file\database.txt';

data mydb;
  length ...;
  format ...;
  informat ...;
  infile dbfile lrecl encoding="wlatin1" dlm=";" missover dsd firstobs=2;
  input ...;
run;&lt;/PRE&gt;
&lt;P&gt;Also, considering coding in lower case, it makes code easier to read.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 08:34:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356805#M83714</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-05-08T08:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Physical file does not exist ( macro)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356827#M83726</link>
      <description>&lt;P&gt;Because i didn't know the statement. Now I know :-D.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and sorry for upper case.&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2017 10:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ERROR-Physical-file-does-not-exist-macro/m-p/356827#M83726</guid>
      <dc:creator>adil256</dc:creator>
      <dc:date>2017-05-08T10:58:33Z</dc:date>
    </item>
  </channel>
</rss>

