<?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: Need Correction on finding the first name in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578293#M13328</link>
    <description>&lt;P&gt;data have;&lt;BR /&gt;input custname:$15.;&lt;BR /&gt;datalines;&lt;BR /&gt;Nichols,KregFI&lt;BR /&gt;Reddy,RamanaBT&lt;BR /&gt;;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;first_name = substr(scan(custname,-1,','),1,length(scan(custname,-1,','))-2);&lt;BR /&gt;run;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Aug 2019 08:26:05 GMT</pubDate>
    <dc:creator>TarunKumar</dc:creator>
    <dc:date>2019-08-01T08:26:05Z</dc:date>
    <item>
      <title>Need Correction on finding the first name</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578291#M13327</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working with data sets which have names like&amp;nbsp;&lt;/P&gt;&lt;P&gt;Nichols, KregFI&lt;BR /&gt;Reddy, RamanaBT&lt;BR /&gt;&lt;BR /&gt;And I have to find the first name as Kreg and Ramana. pls, can anyone help me how to find it?&lt;BR /&gt;I was trying with this code&amp;nbsp;SUBSTR(name,LENGTH(name,",")-1, -2); . but it was giving me an error.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:16:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578291#M13327</guid>
      <dc:creator>u39734216</dc:creator>
      <dc:date>2019-08-01T08:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Need Correction on finding the first name</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578293#M13328</link>
      <description>&lt;P&gt;data have;&lt;BR /&gt;input custname:$15.;&lt;BR /&gt;datalines;&lt;BR /&gt;Nichols,KregFI&lt;BR /&gt;Reddy,RamanaBT&lt;BR /&gt;;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;first_name = substr(scan(custname,-1,','),1,length(scan(custname,-1,','))-2);&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:26:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578293#M13328</guid>
      <dc:creator>TarunKumar</dc:creator>
      <dc:date>2019-08-01T08:26:05Z</dc:date>
    </item>
    <item>
      <title>Re: Need Correction on finding the first name</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578296#M13329</link>
      <description>&lt;P&gt;If it's always two characters that need to be cut away, do this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input name $30.;
datalines;
Nichols, KregFI
Reddy, RamanaBT
;

data want;
set have;
firstname = scan(substr(name,1,length(name)-2),2,',');
run;

proc print data=want noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;     name          firstname

Nichols, KregFI     Kreg    
Reddy, RamanaBT     Ramana  
&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:32:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578296#M13329</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-01T08:32:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need Correction on finding the first name</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578297#M13330</link>
      <description>&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Aug 2019 08:39:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-Correction-on-finding-the-first-name/m-p/578297#M13330</guid>
      <dc:creator>u39734216</dc:creator>
      <dc:date>2019-08-01T08:39:48Z</dc:date>
    </item>
  </channel>
</rss>

