<?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: no observations are copied when I use data keep in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/no-observations-are-copied-when-I-use-data-keep/m-p/337114#M9956</link>
    <description>&lt;P&gt;My best guess:&amp;nbsp; You experimented with many variations of the program, trying to get it to work.&amp;nbsp; In one of those variations, running the program wiped out all the data within Est1.registry.&amp;nbsp; Try printing the first 10 observations, and make sure the data is still there.&amp;nbsp; I'm betting that it's not.&lt;/P&gt;</description>
    <pubDate>Wed, 01 Mar 2017 19:43:04 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-03-01T19:43:04Z</dc:date>
    <item>
      <title>no observations are copied when I use data keep</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/no-observations-are-copied-when-I-use-data-keep/m-p/337100#M9955</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to take my data&amp;nbsp; called registry and only keep 2 variables in a new data set called simple_reg.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Est1.simple_reg (keep = record_num test_history_complete);&amp;nbsp;&amp;nbsp; &amp;nbsp;*take the registry file and reduce the variables;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;set Est1.registry;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Est1.registry has 550 observations and 1700 variables&lt;/P&gt;&lt;P&gt;after I do this Est1.simple_reg has 0 observations and 2 variables ( the two that I keep)&lt;/P&gt;&lt;P&gt;What am i missing.&lt;/P&gt;&lt;P&gt;This new file called Est1.simple_reg shouls have 550 observations because everyone has a record number&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data Est1.simple_reg ();&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;*take the registry file and reduce the variables;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;set Est1.registry;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;keep mrn medical_history_complete;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 18:49:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/no-observations-are-copied-when-I-use-data-keep/m-p/337100#M9955</guid>
      <dc:creator>Curly</dc:creator>
      <dc:date>2017-03-01T18:49:48Z</dc:date>
    </item>
    <item>
      <title>Re: no observations are copied when I use data keep</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/no-observations-are-copied-when-I-use-data-keep/m-p/337114#M9956</link>
      <description>&lt;P&gt;My best guess:&amp;nbsp; You experimented with many variations of the program, trying to get it to work.&amp;nbsp; In one of those variations, running the program wiped out all the data within Est1.registry.&amp;nbsp; Try printing the first 10 observations, and make sure the data is still there.&amp;nbsp; I'm betting that it's not.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 19:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/no-observations-are-copied-when-I-use-data-keep/m-p/337114#M9956</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-03-01T19:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: no observations are copied when I use data keep</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/no-observations-are-copied-when-I-use-data-keep/m-p/337124#M9957</link>
      <description>&lt;P&gt;Thank you so much for helping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty new to Sas and I found out that when I was doing the keep statment I was running into erros because many of the other variables did not have a format and hence it wasn't reading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did this...&lt;/P&gt;&lt;P&gt;data Est1.simple_reg;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;set Est1.registry ( keep = mrn&amp;nbsp; history_complete);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and because I was telling sas which variables to keep before sas wrote them I was able to get around that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again thank you for helping!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Mar 2017 20:00:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/no-observations-are-copied-when-I-use-data-keep/m-p/337124#M9957</guid>
      <dc:creator>Curly</dc:creator>
      <dc:date>2017-03-01T20:00:38Z</dc:date>
    </item>
  </channel>
</rss>

