<?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: Reading a space delimited file with names in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-space-delimited-file-with-names/m-p/378512#M90975</link>
    <description>&lt;P&gt;There is one characteristic of the data that determines whether this is&amp;nbsp;easy or difficult. &amp;nbsp;If you have two spaces after the name(s) instead of one, the problem is simple:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;infile rawdata;&lt;/P&gt;
&lt;P&gt;length place $ 20;&lt;/P&gt;
&lt;P&gt;input place &amp;amp; var1 var2 var3 ....;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some short but relatively complex programming can handle the situation if there is only one space after the name(s).&lt;/P&gt;</description>
    <pubDate>Sun, 23 Jul 2017 09:46:37 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-07-23T09:46:37Z</dc:date>
    <item>
      <title>Reading a space delimited file with names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-space-delimited-file-with-names/m-p/378504#M90972</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have space delimited text file with spaces between two names. I want to use the infile option with delimiter as space and keep the name in the same column. Here is a snippet of the code I am having.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Agoura Hills &amp;nbsp;21127 &amp;nbsp;290 &amp;nbsp;290 &amp;nbsp;0 &amp;nbsp;3 &amp;nbsp;5 &amp;nbsp;48 &amp;nbsp;64 &amp;nbsp;155 &amp;nbsp;15 &amp;nbsp;0&lt;/P&gt;&lt;P&gt;and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2017 07:29:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-space-delimited-file-with-names/m-p/378504#M90972</guid>
      <dc:creator>Sakthivel_Saran</dc:creator>
      <dc:date>2017-07-23T07:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a space delimited file with names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-space-delimited-file-with-names/m-p/378512#M90975</link>
      <description>&lt;P&gt;There is one characteristic of the data that determines whether this is&amp;nbsp;easy or difficult. &amp;nbsp;If you have two spaces after the name(s) instead of one, the problem is simple:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;infile rawdata;&lt;/P&gt;
&lt;P&gt;length place $ 20;&lt;/P&gt;
&lt;P&gt;input place &amp;amp; var1 var2 var3 ....;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some short but relatively complex programming can handle the situation if there is only one space after the name(s).&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jul 2017 09:46:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-space-delimited-file-with-names/m-p/378512#M90975</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-23T09:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Reading a space delimited file with names</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-a-space-delimited-file-with-names/m-p/378514#M90977</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/149224"&gt;@Sakthivel_Saran&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Based on what you've posted the delimiter is a string of two consecutive blanks. If this is true then the following code should work:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  infile datalines truncover dlmstr='  ' dsd;
  input @;
  input name :$20. numvar1-numvar11;
datalines;
Agoura Hills  21127  290  290  0  3  5  48  64  155  15  0
Agoura  21127  290  290  0  3  5  48  64  155  15  0
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 23 Jul 2017 09:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-a-space-delimited-file-with-names/m-p/378514#M90977</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-07-23T09:48:17Z</dc:date>
    </item>
  </channel>
</rss>

