<?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 import a tab delimited file with inconsistent tab space? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567515#M11525</link>
    <description>&lt;P&gt;Good solution but I wanted to use proc import. truly appreciate you taking&amp;nbsp;the time to reply.&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2019 03:52:20 GMT</pubDate>
    <dc:creator>awais</dc:creator>
    <dc:date>2019-06-20T03:52:20Z</dc:date>
    <item>
      <title>how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567128#M11446</link>
      <description>&lt;P&gt;Hi SAS community;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am running into an issue wherein I am unable to import a tab delimited file with inconsistent spacing. I am using the following codes to import the file but getting weird output. I have attached the file for your reference as well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc import datafile = '/folders/myfolders/MyRawData/base-guide-practice-data/cert/class.txt'&lt;BR /&gt;&amp;nbsp;dbms=tab&lt;BR /&gt;&amp;nbsp;out=pg1.class&lt;BR /&gt;&amp;nbsp;replace;&lt;BR /&gt;&amp;nbsp;delimiter = '09'x;&lt;BR /&gt;&amp;nbsp;getnames=yes;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 04:01:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567128#M11446</guid>
      <dc:creator>awais</dc:creator>
      <dc:date>2019-06-19T04:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567133#M11447</link>
      <description>&lt;P&gt;Looking at the file you provided I can't see any inconsistency, but Notepad++ does not show any tabs, but spaces.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So switching to a data-step will be the easiest way to solve importing problems:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; data pg1.class;
   length 
      Name $ 10
      Gender $ 1
      Age 8
   ;
   infile '/folders/myfolders/MyRawData/base-guide-practice-data/cert/class.txt' firstobs=2;
   input @1 Name @10 Gender @19 Age;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 19 Jun 2019 04:55:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567133#M11447</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2019-06-19T04:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567134#M11448</link>
      <description>&lt;P&gt;For some reason, your file contains no tabs but spaces. Replace the spaces between fields with single tabs and your code will read the file just fine.&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 04:57:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567134#M11448</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-06-19T04:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567242#M11467</link>
      <description>&lt;P&gt;If it is not tab delimited file ,using blank as delimiter .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc import datafile = '/folders/myfolders/MyRawData/base-guide-practice-data/cert/class.txt'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;dbms=dlm&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;out=pg1.class&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;replace;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;delimiter = ' '&amp;nbsp; ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;getnames=yes;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 13:02:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567242#M11467</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-06-19T13:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567515#M11525</link>
      <description>&lt;P&gt;Good solution but I wanted to use proc import. truly appreciate you taking&amp;nbsp;the time to reply.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 03:52:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567515#M11525</guid>
      <dc:creator>awais</dc:creator>
      <dc:date>2019-06-20T03:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567516#M11526</link>
      <description>&lt;P&gt;Good solution but I wanted to use proc import. Truly appreciate you taking&amp;nbsp;the time to reply.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 03:52:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567516#M11526</guid>
      <dc:creator>awais</dc:creator>
      <dc:date>2019-06-20T03:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567518#M11527</link>
      <description>&lt;P&gt;changed the codes as following&amp;nbsp;but still not reading it properly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;PROC IMPORT DATAFILE = '/folders/myfolders/MyRawData/base-guide-practice-data/cert/class.txt'&lt;BR /&gt;&amp;nbsp;OUT=CLASSEPORT&lt;BR /&gt;&amp;nbsp;DBMS = dlm&lt;BR /&gt;&amp;nbsp;REPLACE;&lt;BR /&gt;&amp;nbsp;GETNAMES=YES;&lt;BR /&gt;&amp;nbsp;DELIMITER = ' ';&lt;BR /&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 03:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567518#M11527</guid>
      <dc:creator>awais</dc:creator>
      <dc:date>2019-06-20T03:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567519#M11528</link>
      <description>&lt;P&gt;My suggestion was about changing the data, not the code.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 03:57:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567519#M11528</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-06-20T03:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567521#M11529</link>
      <description>&lt;P&gt;what if the data size is big and changing the source isn't possible?&amp;nbsp; I am more interested in knowing the solution of this particular challenge &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; otherwise, reading data by using input statement can do the magic as well.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 04:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567521#M11529</guid>
      <dc:creator>awais</dc:creator>
      <dc:date>2019-06-20T04:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to import a tab delimited file with inconsistent tab space?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567523#M11531</link>
      <description>&lt;P&gt;Then reading the data along the lines suggested by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15475"&gt;@andreas_lds&lt;/a&gt; is the way to go. Proc import is meant to simplify your life when you meet more &lt;EM&gt;complicated&lt;/EM&gt; situations.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 04:20:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/how-to-import-a-tab-delimited-file-with-inconsistent-tab-space/m-p/567523#M11531</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-06-20T04:20:54Z</dc:date>
    </item>
  </channel>
</rss>

