<?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 Data left of a space in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14627#M2964</link>
    <description>How do I get only data left of a space.&lt;BR /&gt;
Ex.  If the field was Jean Pierre and I only wanted Jean to be returned?&lt;BR /&gt;
&lt;BR /&gt;
Also is there a way to do this when the space is in different positions such as space 6 or 8?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
    <pubDate>Tue, 29 Apr 2008 18:46:07 GMT</pubDate>
    <dc:creator>AaroninMN</dc:creator>
    <dc:date>2008-04-29T18:46:07Z</dc:date>
    <item>
      <title>Data left of a space</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14627#M2964</link>
      <description>How do I get only data left of a space.&lt;BR /&gt;
Ex.  If the field was Jean Pierre and I only wanted Jean to be returned?&lt;BR /&gt;
&lt;BR /&gt;
Also is there a way to do this when the space is in different positions such as space 6 or 8?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
      <pubDate>Tue, 29 Apr 2008 18:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14627#M2964</guid>
      <dc:creator>AaroninMN</dc:creator>
      <dc:date>2008-04-29T18:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Data left of a space</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14628#M2965</link>
      <description>SCAN is SAS's tokenizer function.&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test_this;&lt;BR /&gt;
  sentence = "The quick brown fox jumped over the lazy dog";&lt;BR /&gt;
  first_word = scan(sentence,1," ");&lt;BR /&gt;
  last_word = scan(sentence, -1, " ");&lt;BR /&gt;
  &lt;BR /&gt;
  log_string = "2008-04-29 14:55 | application | method | WARNING -- ... " ;&lt;BR /&gt;
  time_string = scan(log_string, 1, "|" );&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
 &lt;BR /&gt;
proc print;&lt;BR /&gt;
run;&lt;BR /&gt;
quit;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
So, read about the SCAN function in the SAS documentation.</description>
      <pubDate>Tue, 29 Apr 2008 18:57:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14628#M2965</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2008-04-29T18:57:48Z</dc:date>
    </item>
    <item>
      <title>Re: Data left of a space</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14629#M2966</link>
      <description>Thank You. For some reason I thought I needed to use substring and trim.</description>
      <pubDate>Tue, 29 Apr 2008 19:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14629#M2966</guid>
      <dc:creator>AaroninMN</dc:creator>
      <dc:date>2008-04-29T19:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Data left of a space</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14630#M2967</link>
      <description>SCAN is a relatively new function.  INDEX and SUBSTR are older tools that could be used to the same effect (but with a lot more effort).</description>
      <pubDate>Wed, 30 Apr 2008 13:59:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Data-left-of-a-space/m-p/14630#M2967</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-04-30T13:59:04Z</dc:date>
    </item>
  </channel>
</rss>

