<?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: FULLNAME to FIRST NAME; LAST NAME (via Contact Name or Business Contact) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397249#M278231</link>
    <description>&lt;P&gt;can you write out the data set?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Sep 2017 20:01:01 GMT</pubDate>
    <dc:creator>Dsrountree</dc:creator>
    <dc:date>2017-09-19T20:01:01Z</dc:date>
    <item>
      <title>FULLNAME to FIRST NAME; LAST NAME (via Contact Name or Business Contact)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397239#M278229</link>
      <description>&lt;P&gt;input fullname indicator;&lt;BR /&gt;datalines;&lt;BR /&gt;LEX HIBEAULT NM&lt;BR /&gt;LEX V TEORGE NM&lt;BR /&gt;AEX-SUT ENERGY CO&lt;/P&gt;
&lt;P&gt;BOBBY N MAJUK CO&lt;BR /&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I need to parse the following data and indicator = NM put scan 1 into first name and scan 2 into last name.&lt;/P&gt;
&lt;P&gt;The problem is when a middle initial appears. &amp;nbsp;I dont want to put V into last name.&lt;/P&gt;
&lt;P&gt;It should put Teorge into last name and ignore the V.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also Bobby N Majuk should be parsed as Bobby first name and Majuk last name. &amp;nbsp;Even when the indicator is CO&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried to write a data set with if then based on evaluating the full name to see if a character after the first scan was = 1, then treat it as first name last name and move each section from full name to first name then last name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Had no luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 19:32:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397239#M278229</guid>
      <dc:creator>Dsrountree</dc:creator>
      <dc:date>2017-09-19T19:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: FULLNAME to FIRST NAME; LAST NAME (via Contact Name or Business Contact)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397243#M278230</link>
      <description>&lt;P&gt;Pull out the last part (CO/NM).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use COUNTW to see the number of words in the string use SCAN to get the first and third strings and if it's 2 use SCAN to get the first and second names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 19:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397243#M278230</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-19T19:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: FULLNAME to FIRST NAME; LAST NAME (via Contact Name or Business Contact)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397249#M278231</link>
      <description>&lt;P&gt;can you write out the data set?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 20:01:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397249#M278231</guid>
      <dc:creator>Dsrountree</dc:creator>
      <dc:date>2017-09-19T20:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: FULLNAME to FIRST NAME; LAST NAME (via Contact Name or Business Contact)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397250#M278232</link>
      <description>&lt;P&gt;A relatively easy way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;firstname&amp;nbsp; = scan(fullname, 1, ' ');&lt;/P&gt;
&lt;P&gt;lastname = scan(fullname, -2, ' ');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That way you don't have to check for a middle initial.&amp;nbsp; You get the first word, and the next-to-last word.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 20:08:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397250#M278232</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-09-19T20:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: FULLNAME to FIRST NAME; LAST NAME (via Contact Name or Business Contact)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397252#M278233</link>
      <description>&lt;P&gt;Is &lt;SPAN class="st"&gt;&lt;EM&gt;Gabriel&lt;/EM&gt; José de la Concordia &lt;EM&gt;García Márquez&lt;/EM&gt;&lt;/SPAN&gt; NM in your dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or &lt;SPAN class="st"&gt;&lt;EM&gt;&lt;SPAN&gt;Casey's General Store&lt;/SPAN&gt; CO?&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Sep 2017 20:30:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397252#M278233</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2017-09-19T20:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: FULLNAME to FIRST NAME; LAST NAME (via Contact Name or Business Contact)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397288#M278234</link>
      <description>This data is a hot mess...The problem with scan is a company can also be in the column and be 3 syllables.&lt;BR /&gt;Ex:ACME Marketing Company</description>
      <pubDate>Tue, 19 Sep 2017 23:05:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397288#M278234</guid>
      <dc:creator>Dsrountree</dc:creator>
      <dc:date>2017-09-19T23:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: FULLNAME to FIRST NAME; LAST NAME (via Contact Name or Business Contact)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397406#M278235</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;- Your suggestion seems more logical, but I never used countw in a data set.&lt;/P&gt;
&lt;P&gt;Can you write a mock example of how it would parse the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;John A Smith&lt;/P&gt;
&lt;P&gt;John Smith&lt;/P&gt;
&lt;P&gt;New York Times&lt;/P&gt;
&lt;P&gt;Flex Gym&lt;/P&gt;
&lt;P&gt;ABC Constructions&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A contact (user) will either be two syllables (John Smith) or two syllables with a middle initial (John A Smith)&lt;/P&gt;
&lt;P&gt;A Company/Business will show up as:&lt;/P&gt;
&lt;P&gt;Two syllable - (Flex Gym, ABC Constructions), or three syllable (New York Times)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One parsed into these multiple sets it will have to be reviewed manually to validate where the mixture/blend of two syllable contact and company business took place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I forsee this (hot mess) mixing items like Flex Gym and John Smith in the same column due to using a scan/countw.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Sep 2017 12:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FULLNAME-to-FIRST-NAME-LAST-NAME-via-Contact-Name-or-Business/m-p/397406#M278235</guid>
      <dc:creator>Dsrountree</dc:creator>
      <dc:date>2017-09-20T12:26:21Z</dc:date>
    </item>
  </channel>
</rss>

