<?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: Keeping only part of a variable that exists after the first space in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Keeping-only-part-of-a-variable-that-exists-after-the-first/m-p/467301#M119284</link>
    <description>&lt;P&gt;Final_Col in below dataset has the target output.&lt;/P&gt;&lt;P&gt;DATA TEMP;&lt;BR /&gt;INPUT Sports $1-35;&lt;BR /&gt;Fst_Col= Length(Scan(STRIP(Sports),1));&lt;BR /&gt;Final_col= SUBSTR(Sports,Fst_col+1);&lt;BR /&gt;DROP Fst_Col;&lt;BR /&gt;CARDS;&lt;BR /&gt;11 Foot Ball&lt;BR /&gt;112 Soccer and golf&lt;BR /&gt;2345 basketball&lt;BR /&gt;12 Table tennis&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2018 05:46:00 GMT</pubDate>
    <dc:creator>mahesh146</dc:creator>
    <dc:date>2018-06-04T05:46:00Z</dc:date>
    <item>
      <title>Keeping only part of a variable that exists after the first space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keeping-only-part-of-a-variable-that-exists-after-the-first/m-p/467296#M119282</link>
      <description>&lt;P&gt;I have the following data:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Sports&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;11 Foot Ball&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;112 Soccer and golf&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2345 basketball&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;12 Table tennis&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I want to keep only the part after the first space. ie:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Sports&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Foot Ball&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Soccer and golf&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;basketball&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Table tennis&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I go about doing this?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 04:49:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keeping-only-part-of-a-variable-that-exists-after-the-first/m-p/467296#M119282</guid>
      <dc:creator>BenBrady</dc:creator>
      <dc:date>2018-06-04T04:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping only part of a variable that exists after the first space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keeping-only-part-of-a-variable-that-exists-after-the-first/m-p/467301#M119284</link>
      <description>&lt;P&gt;Final_Col in below dataset has the target output.&lt;/P&gt;&lt;P&gt;DATA TEMP;&lt;BR /&gt;INPUT Sports $1-35;&lt;BR /&gt;Fst_Col= Length(Scan(STRIP(Sports),1));&lt;BR /&gt;Final_col= SUBSTR(Sports,Fst_col+1);&lt;BR /&gt;DROP Fst_Col;&lt;BR /&gt;CARDS;&lt;BR /&gt;11 Foot Ball&lt;BR /&gt;112 Soccer and golf&lt;BR /&gt;2345 basketball&lt;BR /&gt;12 Table tennis&lt;BR /&gt;;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 05:46:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keeping-only-part-of-a-variable-that-exists-after-the-first/m-p/467301#M119284</guid>
      <dc:creator>mahesh146</dc:creator>
      <dc:date>2018-06-04T05:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Keeping only part of a variable that exists after the first space</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Keeping-only-part-of-a-variable-that-exists-after-the-first/m-p/467400#M119312</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/142222"&gt;@BenBrady&lt;/a&gt;&amp;nbsp;You just need one assignment&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input sports $20.;
cards;
11 Foot Ball
112 Soccer and golf
2345 basketball
12 Table tennis
;

data want;
set have;
sports=substr(sports,anyspace(sports)+1);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 04 Jun 2018 13:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Keeping-only-part-of-a-variable-that-exists-after-the-first/m-p/467400#M119312</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-06-04T13:49:35Z</dc:date>
    </item>
  </channel>
</rss>

