<?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: Help! How do I ttreat the underscore in these text files I'm reading? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-How-do-I-ttreat-the-underscore-in-these-text-files-I-m/m-p/237966#M43668</link>
    <description>&lt;P&gt;Your file name has the underscore in it.. so your infile statement should as well.. &amp;nbsp;i.e.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;infile &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;"/courses/d93a3ee5ba27fe300/c_8666/&amp;amp;city._&amp;amp;gender..t&lt;WBR /&gt;xt"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; dlm=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'_'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; TRUNCOVER;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will resolve as&amp;nbsp;&lt;SPAN&gt;/courses/d93a3ee5ba27fe300/c_8666/Boston_M.t&lt;/SPAN&gt;&lt;WBR /&gt;&lt;SPAN&gt;xt for your example.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As a side note, the dlm is a file delimiter internal to the file, it has no bearing on what delimits the filename. I haven't personally seen a file that was delimited internally by underscores, but that may be what you're working with.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 05 Dec 2015 19:05:53 GMT</pubDate>
    <dc:creator>JoshB</dc:creator>
    <dc:date>2015-12-05T19:05:53Z</dc:date>
    <item>
      <title>Help! How do I ttreat the underscore in these text files I'm reading?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-How-do-I-ttreat-the-underscore-in-these-text-files-I-m/m-p/237965#M43667</link>
      <description>&lt;P&gt;Thank you for help in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to simply read in several text files that have the same format and in the same location.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The files have names like "Boston_M.txt", "Boston_F.txt", etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a macro, I'm passing the city and gender variables - and that piece is resolving per the log.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, my issue is what to do about the "_" in the text file names that separates the city and gender.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log states:&lt;/P&gt;
&lt;P&gt;ERROR: Physical file does not exist, /courses/d93a3ee5ba27fe300/c_8666/BostonM.txt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could someone suggest a modification in the infile statement as I cannot change the names of the original files.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; import_files (city, gender);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;data &amp;amp;city&amp;amp;gender;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; infile &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;"/courses/d93a3ee5ba27fe300/c_8666/&amp;amp;city&amp;amp;gender..txt"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; dlm=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'_'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; TRUNCOVER;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; INPUT ID &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;3&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; Race $&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;4&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&amp;nbsp;State &lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;6&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;-&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;8&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;/* _infile_=translate(_infile_,'_','''');*/&lt;/P&gt;
&lt;P&gt;/* _infile_=compress(_infile_," @%/.'?""");*/&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; import_files;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2015 18:46:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-How-do-I-ttreat-the-underscore-in-these-text-files-I-m/m-p/237965#M43667</guid>
      <dc:creator>karen_e_wallace</dc:creator>
      <dc:date>2015-12-05T18:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help! How do I ttreat the underscore in these text files I'm reading?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-How-do-I-ttreat-the-underscore-in-these-text-files-I-m/m-p/237966#M43668</link>
      <description>&lt;P&gt;Your file name has the underscore in it.. so your infile statement should as well.. &amp;nbsp;i.e.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;infile &lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;"/courses/d93a3ee5ba27fe300/c_8666/&amp;amp;city._&amp;amp;gender..t&lt;WBR /&gt;xt"&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; dlm=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;&lt;FONT face="Courier New" size="3" color="#800080"&gt;'_'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt; TRUNCOVER;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will resolve as&amp;nbsp;&lt;SPAN&gt;/courses/d93a3ee5ba27fe300/c_8666/Boston_M.t&lt;/SPAN&gt;&lt;WBR /&gt;&lt;SPAN&gt;xt for your example.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As a side note, the dlm is a file delimiter internal to the file, it has no bearing on what delimits the filename. I haven't personally seen a file that was delimited internally by underscores, but that may be what you're working with.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2015 19:05:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-How-do-I-ttreat-the-underscore-in-these-text-files-I-m/m-p/237966#M43668</guid>
      <dc:creator>JoshB</dc:creator>
      <dc:date>2015-12-05T19:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: Help! How do I ttreat the underscore in these text files I'm reading?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-How-do-I-ttreat-the-underscore-in-these-text-files-I-m/m-p/237968#M43669</link>
      <description>&lt;P&gt;JoshB - thanks a million! That's so simple...still a SAS newbie &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 05 Dec 2015 19:44:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-How-do-I-ttreat-the-underscore-in-these-text-files-I-m/m-p/237968#M43669</guid>
      <dc:creator>karen_e_wallace</dc:creator>
      <dc:date>2015-12-05T19:44:24Z</dc:date>
    </item>
  </channel>
</rss>

