<?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: How to distinguish space with TAB in raw data? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394531#M95091</link>
    <description>&lt;P&gt;The tab character can be noted in SAS as '09'x. You could run a preliminary data step that checks for the presence of that character, and sets it as a macro variable which can be used as the delimiter in the main input data step.&lt;/P&gt;</description>
    <pubDate>Sun, 10 Sep 2017 18:58:57 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-09-10T18:58:57Z</dc:date>
    <item>
      <title>How to distinguish space with TAB in raw data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394523#M95084</link>
      <description>&lt;P&gt;In data step, I have to check whether the delimiter is space or tab. When I open the file with notepad. It can't distinguish space and TAB.&lt;/P&gt;&lt;P&gt;My question is "How to distinguish space with TAB in raw data?"&lt;/P&gt;&lt;P&gt;I use spread sheet to open it first then identify the delimiter. Is there any way to examine it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 18:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394523#M95084</guid>
      <dc:creator>sas_newbie3</dc:creator>
      <dc:date>2017-09-10T18:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to distinguish space with TAB in raw data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394525#M95086</link>
      <description>&lt;P&gt;I use an advanced editor such as UltraEdit to see them. You can also do the same inNotepad++ or use Word and show control characters.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 18:01:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394525#M95086</guid>
      <dc:creator>AlanC</dc:creator>
      <dc:date>2017-09-10T18:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to distinguish space with TAB in raw data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394527#M95087</link>
      <description>&lt;P&gt;Did you try expandtabs:-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/*example*/&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;infile 'C:\Users\NSRINIV2\Desktop\tabandspace.txt' &lt;STRONG&gt;expandtabs&lt;/STRONG&gt; truncover firstobs=2;&lt;BR /&gt;input a b c;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 18:13:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394527#M95087</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-09-10T18:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to distinguish space with TAB in raw data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394528#M95088</link>
      <description>&lt;P&gt;Sorry for confusion. I edited the question. I want to know&lt;SPAN&gt;&amp;nbsp;whether the delimiter is space or tab rather then set it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 18:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394528#M95088</guid>
      <dc:creator>sas_newbie3</dc:creator>
      <dc:date>2017-09-10T18:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to distinguish space with TAB in raw data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394530#M95090</link>
      <description>&lt;P&gt;Ok, To check whether a value is delimited with space or tab, the only way that I can think of is(in a datastep) to logically check how may bytes of space the input pointer moved from the end of one value to another. So, you could use col= option to read where the input pointer is once a value is read and the where the new value begins.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next, you take the difference. I suppose a tab must have a constant number of bytes that is consistent globally. So if the difference matches that constant, you take that as tab demilited&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 18:46:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394530#M95090</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-09-10T18:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to distinguish space with TAB in raw data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394531#M95091</link>
      <description>&lt;P&gt;The tab character can be noted in SAS as '09'x. You could run a preliminary data step that checks for the presence of that character, and sets it as a macro variable which can be used as the delimiter in the main input data step.&lt;/P&gt;</description>
      <pubDate>Sun, 10 Sep 2017 18:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394531#M95091</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-09-10T18:58:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to distinguish space with TAB in raw data?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394537#M95094</link>
      <description>&lt;P&gt;Just look for tab characters in the file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  infile 'myfile.txt' obs=1;
  input ;
  if index(_infile_,'09'x) then put 'There are tabs in this file';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Sep 2017 20:24:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-distinguish-space-with-TAB-in-raw-data/m-p/394537#M95094</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-09-10T20:24:33Z</dc:date>
    </item>
  </channel>
</rss>

