<?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 drop variable if the variable starts with 60 in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191065#M48131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have a dataset with a column ticker &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ticker&lt;/P&gt;&lt;P&gt;941&lt;/P&gt;&lt;P&gt;60941&lt;/P&gt;&lt;P&gt;70&lt;/P&gt;&lt;P&gt;6070&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to drop the rows that start with '60'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how may i apporach this? thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Apr 2014 20:36:46 GMT</pubDate>
    <dc:creator>aarony</dc:creator>
    <dc:date>2014-04-23T20:36:46Z</dc:date>
    <item>
      <title>drop variable if the variable starts with 60</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191065#M48131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have a dataset with a column ticker &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ticker&lt;/P&gt;&lt;P&gt;941&lt;/P&gt;&lt;P&gt;60941&lt;/P&gt;&lt;P&gt;70&lt;/P&gt;&lt;P&gt;6070&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to drop the rows that start with '60'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how may i apporach this? thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 20:36:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191065#M48131</guid>
      <dc:creator>aarony</dc:creator>
      <dc:date>2014-04-23T20:36:46Z</dc:date>
    </item>
    <item>
      <title>Re: drop variable if the variable starts with 60</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191066#M48132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your variable is varchar than you can use a simple "substr" function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;where substr(name,1,2)~='60';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If its a numeric, you will have to use a put option to convert it before using the substr (there are lots of other ways I imagine. this is more of a beginner method).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;where substr(strip(put(name,32.)),1,2)~='60';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a note, but I would actually use a where clause&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 21:01:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191066#M48132</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2014-04-23T21:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: drop variable if the variable starts with 60</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191067#M48133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;for some strange reason it is not working. &lt;/P&gt;&lt;P&gt;there are ticker with&lt;/P&gt;&lt;P&gt;60001&lt;/P&gt;&lt;P&gt;60002&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;260&lt;/P&gt;&lt;P&gt;2600&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i just want to drop the ones that start with 60 and still keep the ones with 260 and 2600.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 21:05:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191067#M48133</guid>
      <dc:creator>aarony</dc:creator>
      <dc:date>2014-04-23T21:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: drop variable if the variable starts with 60</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191068#M48134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You'd have to re-point the column to your actual column (ticker. I used a made up column called "name").&amp;nbsp; so just replace "name" with "ticker". I redid it for you below if you are wondering.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Varchar&lt;/P&gt;&lt;P&gt;data want&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;where substr(ticker,1,2)~='60';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Numeric&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;where substr(strip(put(ticker,32.)),1,2)~='60';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 21:09:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191068#M48134</guid>
      <dc:creator>Anotherdream</dc:creator>
      <dc:date>2014-04-23T21:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: drop variable if the variable starts with 60</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191069#M48135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as TICKER is a character variable and you don't want to use SQL then it is really easy.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ticker &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;$10.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;941&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;60941&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;70&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;6070&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; want ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;where&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ticker ^=: &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'60'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ticker=;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Apr 2014 21:29:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/drop-variable-if-the-variable-starts-with-60/m-p/191069#M48135</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-04-23T21:29:16Z</dc:date>
    </item>
  </channel>
</rss>

