<?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 Updating missing values question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Updating-missing-values-question/m-p/87223#M18620</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two datasets that are structured the same but some values in one are missing whereas they may or may not be missing in the other and vice versa. I was looking for a way to combine the two datasets and only having the missing variables be overwritten with existing values of the other dataset. Is this possible to do? As I read it, the update statement will overwrite the values of one table with values from the other table including missings, but also all the other values it finds. Is there a command to only overwrite if values are missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jun 2012 18:45:07 GMT</pubDate>
    <dc:creator>Alphanumeric</dc:creator>
    <dc:date>2012-06-19T18:45:07Z</dc:date>
    <item>
      <title>Updating missing values question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Updating-missing-values-question/m-p/87223#M18620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two datasets that are structured the same but some values in one are missing whereas they may or may not be missing in the other and vice versa. I was looking for a way to combine the two datasets and only having the missing variables be overwritten with existing values of the other dataset. Is this possible to do? As I read it, the update statement will overwrite the values of one table with values from the other table including missings, but also all the other values it finds. Is there a command to only overwrite if values are missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 18:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Updating-missing-values-question/m-p/87223#M18620</guid>
      <dc:creator>Alphanumeric</dc:creator>
      <dc:date>2012-06-19T18:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Updating missing values question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Updating-missing-values-question/m-p/87224#M18621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Think about it ... you already have the tools you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let's work with these assumptions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;master = data set with the good information, but a few missing values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;updates = data set with additional information that should replace only the missing values in master&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Both data sets are sorted by ID, and contain at most one observation per ID.&amp;nbsp; (We can work around that if it's not the case.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get what you are looking for, you have noted that this will fail:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final;&lt;/P&gt;&lt;P&gt;update master updates;&lt;/P&gt;&lt;P&gt;by id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nonmissing values in master get replaced if nonmissing values also appear in updates.&amp;nbsp; But this program gives you exactly what you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final;&lt;/P&gt;&lt;P&gt;update updates master;&lt;/P&gt;&lt;P&gt;by id;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2012 19:35:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Updating-missing-values-question/m-p/87224#M18621</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-06-19T19:35:38Z</dc:date>
    </item>
  </channel>
</rss>

