<?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: save only letters before coma in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/save-only-letters-before-coma/m-p/697715#M25432</link>
    <description>&lt;P&gt;Something like&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   length first $ 15;
   first = scan(name,1);
run;&lt;/PRE&gt;
&lt;P&gt;It really helps to provide example data with the names of your variables and characteristics.&lt;/P&gt;
&lt;P&gt;Above I am guessing that the longest of the first word will be 15 characters long.&lt;/P&gt;</description>
    <pubDate>Mon, 09 Nov 2020 20:59:57 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-11-09T20:59:57Z</dc:date>
    <item>
      <title>save only letters before coma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/save-only-letters-before-coma/m-p/697714#M25431</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;I have a dataset:&lt;/P&gt;&lt;P&gt;Byran,Maer&lt;/P&gt;&lt;P&gt;yasmen kiy&lt;/P&gt;&lt;P&gt;Ali, dert&lt;/P&gt;&lt;P&gt;Mi, Yehchg&lt;/P&gt;&lt;P&gt;I want to have the name before the coma(,)&lt;/P&gt;&lt;P&gt;wanted dataset;&lt;/P&gt;&lt;P&gt;Byran&lt;/P&gt;&lt;P&gt;Yasmen&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;&lt;P&gt;Mi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I do this in SAS?&lt;/P&gt;&lt;P&gt;thank you in advance.&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>Mon, 09 Nov 2020 20:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/save-only-letters-before-coma/m-p/697714#M25431</guid>
      <dc:creator>Smitha9</dc:creator>
      <dc:date>2020-11-09T20:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: save only letters before coma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/save-only-letters-before-coma/m-p/697715#M25432</link>
      <description>&lt;P&gt;Something like&lt;/P&gt;
&lt;PRE&gt;data want;
   set have;
   length first $ 15;
   first = scan(name,1);
run;&lt;/PRE&gt;
&lt;P&gt;It really helps to provide example data with the names of your variables and characteristics.&lt;/P&gt;
&lt;P&gt;Above I am guessing that the longest of the first word will be 15 characters long.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 20:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/save-only-letters-before-coma/m-p/697715#M25432</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-11-09T20:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: save only letters before coma</title>
      <link>https://communities.sas.com/t5/New-SAS-User/save-only-letters-before-coma/m-p/699554#M25626</link>
      <description>&lt;P&gt;The SCAN function would be the easiest way to achieve this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NewVarName = SCAN(oldvarname, count, ',') ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Count - is the word number (the position of where it is in the text string); yours should be 1.&lt;/P&gt;&lt;P&gt;Your DLM is a comma&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A title="SCAN function " href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lefunctionsref&amp;amp;docsetTarget=p0jshdjy2z9zdzn1h7k90u99lyq6.htm&amp;amp;locale=en" target="_self"&gt;Here is helpful documentation for the future SCAN function&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2020 16:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/save-only-letters-before-coma/m-p/699554#M25626</guid>
      <dc:creator>lsandell</dc:creator>
      <dc:date>2020-11-17T16:16:30Z</dc:date>
    </item>
  </channel>
</rss>

