<?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 Keep only the starting word or combination of words in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549352#M152420</link>
    <description>&lt;P&gt;Dear Sas Community:&lt;/P&gt;&lt;P&gt;I have a simple dataset but I am trying to keep just the first word in the column.&lt;/P&gt;&lt;P&gt;My have data is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile datalines dsd truncover;
  input _NAME_:$50. ;
datalines4;
Hurricane 1980 Allen;
Hurricane 1991 Bob;
Freeze 1990 - California;
Freeze 1998 - California;
Hurricane/ Flood;&lt;BR /&gt;Flood/ Hurricane;&lt;BR /&gt;Severe Weather 2011;
;;;;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My want table is:&lt;/P&gt;&lt;P&gt;How can I achieve that efficeintly?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile datalines dsd truncover;
  input _NAME_:$50. ;
datalines4;
Hurricane;
Hurricane;
Freeze;
Freeze ;
Hurricane;&lt;BR /&gt;Flood;&lt;BR /&gt;Severe Weather
;;;;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Apr 2019 18:00:39 GMT</pubDate>
    <dc:creator>Agent1592</dc:creator>
    <dc:date>2019-04-08T18:00:39Z</dc:date>
    <item>
      <title>Keep only the starting word or combination of words</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549352#M152420</link>
      <description>&lt;P&gt;Dear Sas Community:&lt;/P&gt;&lt;P&gt;I have a simple dataset but I am trying to keep just the first word in the column.&lt;/P&gt;&lt;P&gt;My have data is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  infile datalines dsd truncover;
  input _NAME_:$50. ;
datalines4;
Hurricane 1980 Allen;
Hurricane 1991 Bob;
Freeze 1990 - California;
Freeze 1998 - California;
Hurricane/ Flood;&lt;BR /&gt;Flood/ Hurricane;&lt;BR /&gt;Severe Weather 2011;
;;;;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;My want table is:&lt;/P&gt;&lt;P&gt;How can I achieve that efficeintly?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile datalines dsd truncover;
  input _NAME_:$50. ;
datalines4;
Hurricane;
Hurricane;
Freeze;
Freeze ;
Hurricane;&lt;BR /&gt;Flood;&lt;BR /&gt;Severe Weather
;;;;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 18:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549352#M152420</guid>
      <dc:creator>Agent1592</dc:creator>
      <dc:date>2019-04-08T18:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only the starting word</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549354#M152422</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  length firstword $ 20;
  infile datalines dsd truncover;
  input _NAME_:$50. ;
  firstword = scan(_name_,1);
  drop _name_;
datalines4;
Hurricane 1980 Allen;
Hurricane 1991 Bob;
Freeze 1990 - California;
Freeze 1998 - California;
Hurricane/ Flood;
;;;;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 Apr 2019 17:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549354#M152422</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-08T17:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only the starting word</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549363#M152426</link>
      <description>&lt;P&gt;Yes this works but how about if I have two words at the beginning like "Severe Weather"&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 18:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549363#M152426</guid>
      <dc:creator>Agent1592</dc:creator>
      <dc:date>2019-04-08T18:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Keep only the starting word</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549367#M152429</link>
      <description>&lt;P&gt;Then you need to develop a rule that covers all such cases where you want the second word (and also indicates when you don't want the second word) and then program that rule.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Apr 2019 18:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keep-only-the-starting-word-or-combination-of-words/m-p/549367#M152429</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-04-08T18:10:24Z</dc:date>
    </item>
  </channel>
</rss>

