<?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: Remove Character in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25745#M5846</link>
    <description>Using a DATA step, have a SAS assignment statement use SUBSTR function and also the FIND function (to locate the first blank from the end) using a negative value for argument #3 to start from the end of the variable.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Sat, 30 Oct 2010 14:54:02 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-10-30T14:54:02Z</dc:date>
    <item>
      <title>Remove Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25744#M5845</link>
      <description>I am trying to remove characters after a space in a string variable. &lt;BR /&gt;
i.e. Change "Johns,Robert James" to "Johns,Robert".&lt;BR /&gt;
&lt;BR /&gt;
In excel, the function  is =LEFT(B2,FIND(" ",B2,1)-1) But my file is too big that I cannot change the variable in Excel.&lt;BR /&gt;
&lt;BR /&gt;
How can I write the code to convert the variable?&lt;BR /&gt;
&lt;BR /&gt;
Thanks</description>
      <pubDate>Sat, 30 Oct 2010 00:14:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25744#M5845</guid>
      <dc:creator>sfs</dc:creator>
      <dc:date>2010-10-30T00:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25745#M5846</link>
      <description>Using a DATA step, have a SAS assignment statement use SUBSTR function and also the FIND function (to locate the first blank from the end) using a negative value for argument #3 to start from the end of the variable.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Sat, 30 Oct 2010 14:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25745#M5846</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-10-30T14:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25746#M5847</link>
      <description>Thanks a million.</description>
      <pubDate>Sun, 31 Oct 2010 01:58:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25746#M5847</guid>
      <dc:creator>sfs</dc:creator>
      <dc:date>2010-10-31T01:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25747#M5848</link>
      <description>Using a negative finds the first blank from the right side of the variable.  From your example, I think that you want to find the first blank from the left side.  So, don't use -1, use 1, if that is truly the case.</description>
      <pubDate>Mon, 01 Nov 2010 13:40:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25747#M5848</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2010-11-01T13:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Character</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25748#M5849</link>
      <description>Good point, advoss - in that case, consider using the SCAN function.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 01 Nov 2010 16:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Remove-Character/m-p/25748#M5849</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-11-01T16:30:03Z</dc:date>
    </item>
  </channel>
</rss>

