<?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 Strip portion of variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419970#M103309</link>
    <description>&lt;P&gt;data test(keep=Disaster);&lt;/P&gt;
&lt;P&gt;set test1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample Output&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Disaster&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Hurricane&amp;nbsp;Harvey&lt;BR /&gt;Hurricane Beula&lt;BR /&gt;Hurricane Agnes&amp;nbsp;&lt;BR /&gt;Wildfires&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the variable begins with Hurricane&amp;nbsp;&amp;nbsp;I want to delete it and just show the word after the blank space.&amp;nbsp; I looked at compress, trim, strip functions however no examples.&amp;nbsp; How can I accomplish this ??&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 10 Dec 2017 20:45:29 GMT</pubDate>
    <dc:creator>Q1983</dc:creator>
    <dc:date>2017-12-10T20:45:29Z</dc:date>
    <item>
      <title>Strip portion of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419970#M103309</link>
      <description>&lt;P&gt;data test(keep=Disaster);&lt;/P&gt;
&lt;P&gt;set test1;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sample Output&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Disaster&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;Hurricane&amp;nbsp;Harvey&lt;BR /&gt;Hurricane Beula&lt;BR /&gt;Hurricane Agnes&amp;nbsp;&lt;BR /&gt;Wildfires&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the variable begins with Hurricane&amp;nbsp;&amp;nbsp;I want to delete it and just show the word after the blank space.&amp;nbsp; I looked at compress, trim, strip functions however no examples.&amp;nbsp; How can I accomplish this ??&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 20:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419970#M103309</guid>
      <dc:creator>Q1983</dc:creator>
      <dc:date>2017-12-10T20:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Strip portion of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419971#M103310</link>
      <description>&lt;P&gt;data have;&lt;BR /&gt;input disaster $20.;&lt;BR /&gt;datalines;&lt;BR /&gt;Hurricane Harvey&lt;BR /&gt;Hurricane Beula&lt;BR /&gt;Hurricane Agnes&lt;BR /&gt;Wildfires&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;if scan(disaster,1)='Hurricane' then _disaster=scan(disaster,2);&lt;BR /&gt;else _disaster=disaster;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or with IFC function:&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;/*if scan(disaster,1)='Hurricane' then _disaster=scan(disaster,2);*/&lt;BR /&gt;/*else _disaster=disaster;*/&lt;BR /&gt;&lt;STRONG&gt;_disaster=ifc(scan(disaster,1)='Hurricane' , scan(disaster,2), disaster);&lt;/STRONG&gt;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 20:52:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419971#M103310</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2017-12-10T20:52:42Z</dc:date>
    </item>
    <item>
      <title>Re: Strip portion of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419978#M103311</link>
      <description>&lt;P&gt;I guess hurricanes usually receive one-word names.&amp;nbsp; Just in case there is more than one word following "Hurricane" this might be a little safer:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;data want;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;set have;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if upcase(scan(disaster,1))='HURRICANE' then _disaster=substr(disaster,11);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;else _disaster=disaster;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 10 Dec 2017 22:17:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419978#M103311</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-12-10T22:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: Strip portion of variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419985#M103312</link>
      <description>&lt;P&gt;or&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WANT;
  set HAVE;
  if upcase(DISASTER) =: 'HURRICANE ' then DISASTER = substr(DISASTER,11);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Dec 2017 23:12:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Strip-portion-of-variable/m-p/419985#M103312</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-12-10T23:12:09Z</dc:date>
    </item>
  </channel>
</rss>

