<?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 How to create data subset? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-data-subset/m-p/143678#M261757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have this big data set and I need to create few subsets:&lt;/P&gt;&lt;P&gt;1) if _market_ contains the word "notes' =&amp;gt; then take all "notes" out to a new dataset and remove them from the main dataset&lt;/P&gt;&lt;P&gt;2)then if _taxable_ = "Y" =&amp;gt; then take all taxable out to a new dataset and remove them from the main dataset&lt;/P&gt;&lt;P&gt;.......and so on with few more characteristics to be taken out and at the end I want to have one dataset that doesn't contain notes, taxable etc...(based on my other if statements) and then datasets where I keep separate all the once that I don't need (for example I will have a separate dataset wit "notes", another separate wit "taxable" etc...) ...so ideally I want to create 6 datasets from the main one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help and suggestions will be great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Nov 2013 16:56:54 GMT</pubDate>
    <dc:creator>letsdoit</dc:creator>
    <dc:date>2013-11-14T16:56:54Z</dc:date>
    <item>
      <title>How to create data subset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-data-subset/m-p/143678#M261757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I have this big data set and I need to create few subsets:&lt;/P&gt;&lt;P&gt;1) if _market_ contains the word "notes' =&amp;gt; then take all "notes" out to a new dataset and remove them from the main dataset&lt;/P&gt;&lt;P&gt;2)then if _taxable_ = "Y" =&amp;gt; then take all taxable out to a new dataset and remove them from the main dataset&lt;/P&gt;&lt;P&gt;.......and so on with few more characteristics to be taken out and at the end I want to have one dataset that doesn't contain notes, taxable etc...(based on my other if statements) and then datasets where I keep separate all the once that I don't need (for example I will have a separate dataset wit "notes", another separate wit "taxable" etc...) ...so ideally I want to create 6 datasets from the main one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any and all help and suggestions will be great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 16:56:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-data-subset/m-p/143678#M261757</guid>
      <dc:creator>letsdoit</dc:creator>
      <dc:date>2013-11-14T16:56:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to create data subset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-data-subset/m-p/143679#M261758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this may get you started:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Notes&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Taxable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NewMainData;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set maindata;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if indexw(upcase(_market_,'NOTES') &amp;gt; 0 then output Notes;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if _taxable_ = 'Y' then output Taxable;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if indexw(upcase(_market_,'NOTES') = 0 &lt;STRONG&gt;and&lt;/STRONG&gt; _taxable_ ne 'Y' then output NewMainData;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really recommend NOT updating your original main data set until you are sure everything is working which is why I create a new Main data set.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Nov 2013 17:07:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-data-subset/m-p/143679#M261758</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-11-14T17:07:03Z</dc:date>
    </item>
  </channel>
</rss>

