<?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: multiple delimiter reading scan function?? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398621#M96447</link>
    <description>&lt;P&gt;This is mildly clumsy, but it should work when&amp;nbsp;you are searching for the beginning of the incoming string:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;name1 = substr(name, 1, index(name, '&amp;nbsp;&amp;nbsp; ') ) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Sep 2017 17:18:13 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-09-25T17:18:13Z</dc:date>
    <item>
      <title>multiple delimiter reading scan function??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398614#M96442</link>
      <description>&lt;P&gt;SAS group,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;could you please help me get this from string name (3 spaces as delimiters, between name and city). I want to extract name.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any thoughts please. I have sas eg and it is not taking scan function (quotation marks has 3 spaces in between). It worked in SAS 9.3, but not in sas eg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;example: name1=scan(name,1," &amp;nbsp; ");&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;have file&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;name &amp;nbsp; city &amp;nbsp; state &amp;nbsp;zipcode&lt;/P&gt;&lt;P&gt;wal mart &amp;nbsp; siouxcity &amp;nbsp; ia &amp;nbsp;14525&lt;/P&gt;&lt;P&gt;arthur chiropracter nd &amp;nbsp; richmond &amp;nbsp; ca &amp;nbsp;25684&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;want file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;wal mart&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arthur chiropracter nd&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 16:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398614#M96442</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-09-25T16:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: multiple delimiter reading scan function??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398617#M96444</link>
      <description>&lt;P&gt;Are you reading an external file? If you actually have 3 characters between each field you could use the dlmstr='&amp;nbsp;&amp;nbsp; ' option instead of dlm&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However the data you show has only two spaces between the state and the zipcode so perhaps dlmstr='&amp;nbsp; ' (two spaces) will actually work to read the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 17:09:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398617#M96444</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-09-25T17:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: multiple delimiter reading scan function??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398621#M96447</link>
      <description>&lt;P&gt;This is mildly clumsy, but it should work when&amp;nbsp;you are searching for the beginning of the incoming string:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;name1 = substr(name, 1, index(name, '&amp;nbsp;&amp;nbsp; ') ) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Sep 2017 17:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398621#M96447</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-09-25T17:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: multiple delimiter reading scan function??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398626#M96450</link>
      <description>This works thanks Astounding</description>
      <pubDate>Mon, 25 Sep 2017 17:29:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multiple-delimiter-reading-scan-function/m-p/398626#M96450</guid>
      <dc:creator>buddha_d</dc:creator>
      <dc:date>2017-09-25T17:29:53Z</dc:date>
    </item>
  </channel>
</rss>

