<?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: Update missing values from with in Table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82552#M256715</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes but you to write more code: rename and assignments, etc.&amp;nbsp; The MISSING CHECK feature of the UPDATE is a powerfull alternative applied to all the variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2013 15:04:01 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2013-05-22T15:04:01Z</dc:date>
    <item>
      <title>Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82543#M256706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have to update missing values in a in both coulmns using value of adjacent coulmn as refernce for search. refer to below example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="174" style="width: 147px; height: 98px; border: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Coulmn 1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Coulmn 2&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As in ROW1 values are available for both coulmn, i want to update missing values in ROW2 &amp;amp; ROW3 , please guide How ? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 08:21:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82543#M256706</guid>
      <dc:creator>AliJ</dc:creator>
      <dc:date>2013-05-22T08:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82544#M256707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look up the "lag()" function and "SAS by processing" (first and last);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 10:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82544#M256707</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2013-05-22T10:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82545#M256708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Question couldn't more vague. "&lt;STRONG&gt;using&lt;/STRONG&gt; value of &lt;STRONG&gt;adjacent coulmn&lt;/STRONG&gt; as &lt;STRONG&gt;refernce&lt;/STRONG&gt;"&lt;/P&gt;&lt;P&gt;1. I assume it is actually adjacent rows you are looking at, not column, from your context. But I could be wrong.&lt;/P&gt;&lt;P&gt;2. Adjacent where? which direction? from top down or from bottom up?&lt;/P&gt;&lt;P&gt;3. Reference how? how many values you take into consideration? straight copy&amp;nbsp; or do something else, such as mean?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 13:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82545#M256708</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-05-22T13:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82546#M256709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps simplest:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if column1 &amp;gt; ' ' then last_column1 = column1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else column1 = last_column1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; retain last_column1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if column2 &amp;gt; . then last_column2 = column2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else column2 = last_column2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; retain last_column2;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; drop last_column1 last_column2;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm hoping that this "simplest" approach is actually what you are looking for ... each variable can operate independently of the other.&amp;nbsp; So if column2 is missing for the first observation having column1=B, it is OK to use a column2 value from column1=A.&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>Wed, 22 May 2013 13:16:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82546#M256709</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-05-22T13:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82547#M256710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;assuming that the first record of each by group is never missing i did this coding and still the table does not update.you know why,just curious?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;input Cou1 $ Cou2;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 &lt;/P&gt;&lt;P&gt;B .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data two;&lt;/P&gt;&lt;P&gt;set one;&lt;/P&gt;&lt;P&gt;by cou1&amp;nbsp; notsorted;&lt;/P&gt;&lt;P&gt;lag_cou1=lag(cou1);&lt;/P&gt;&lt;P&gt;lag_cou2=lag(cou2);&lt;/P&gt;&lt;P&gt;if not(first.cou1) then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if cou1=' ' then cou1=lag_cou1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if cou2=. then cou2=lag_cou2; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 13:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82547#M256710</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-05-22T13:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82548#M256711</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you encounter a missing value for COU1, you are also encountering FIRST.COU1=1.&amp;nbsp; So your IF THEN group will not execute.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 14:29:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82548#M256711</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-05-22T14:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82549#M256712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Lag is not appropiate for this problem.&amp;nbsp; But there are easy ways to get the desired result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="font-family: Courier New; font-size: 11pt;"&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; a;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; C1 :&lt;/SPAN&gt;&lt;SPAN style="color: #008080; background-color: #ffffff;"&gt;$1.&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; C2;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;cards&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffc0;"&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;A&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;BR /&gt;.&amp;nbsp;&amp;nbsp;&amp;nbsp; 2 &lt;BR /&gt;B&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;;;;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; av/ &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;view&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;=av;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; a;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; dummyby &lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;1&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;data&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; coalesced;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;update&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; av(obs=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;) av;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; dummyby;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;output&lt;/SPAN&gt;; &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; dummyby;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;STRONG style="color: #000080; background-color: #ffffff;"&gt;run&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;; &lt;BR /&gt;&lt;BR /&gt;;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 14:46:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82549#M256712</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-05-22T14:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82550#M256713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Slick! There are also ways get it simply done in one step, inspired by the name you used "coalesced",&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input C1 :$1. C2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards; &lt;/P&gt;&lt;P&gt;A 1&lt;/P&gt;&lt;P&gt;. 1&lt;/P&gt;&lt;P&gt;A .&lt;/P&gt;&lt;P&gt;B 2&lt;/P&gt;&lt;P&gt;. 2 &lt;/P&gt;&lt;P&gt;B .&lt;/P&gt;&lt;P&gt;;;;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data b ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set a; &lt;/P&gt;&lt;P&gt;&amp;nbsp; retain _1 ' ';&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain _2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; c1=coalescec(c1,_1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; c2=coalesce(c2,_2);&lt;/P&gt;&lt;P&gt;&amp;nbsp; _1=c1;_2=c2; &lt;/P&gt;&lt;P&gt;&amp;nbsp; drop _:;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 14:55:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82550#M256713</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-05-22T14:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82551#M256714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;but cou1 is never missing when first.cou1=1.At least that what the table above shows?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 14:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82551#M256714</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-05-22T14:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82552#M256715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes but you to write more code: rename and assignments, etc.&amp;nbsp; The MISSING CHECK feature of the UPDATE is a powerfull alternative applied to all the variables.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 15:04:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82552#M256715</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-05-22T15:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82553#M256716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, DN! And I have to use Array() if more variables get involved, the code will be increasingly bulky.&amp;nbsp; I was thinking of using Update, but didn't go far enough to introduce a dummy id variable. Another trick I learned from you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 15:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82553#M256716</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-05-22T15:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82554#M256717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry,what does&amp;nbsp; this line below exactly do? &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; background-color: #ffffff;"&gt;update&lt;/SPAN&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt; av(obs=&lt;/SPAN&gt;&lt;STRONG style="color: #008080; background-color: #ffffff;"&gt;0&lt;/STRONG&gt;&lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;) av;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 15:18:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82554#M256717</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-05-22T15:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82555#M256718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you looked at the documentation regarding the UPDATE statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRT the line in question, it reads observations from the transaction data using the UPDATE statement.&amp;nbsp; The UPDATE statement requires exactly two data sets as input a master and transaction.&amp;nbsp; This technique uses a dummy master av(obs=0).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 16:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82555#M256718</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-05-22T16:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82556#M256719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the av(obs=0) was actually confusing me.Merging a table with rows with&amp;nbsp; a&amp;nbsp; table with no rows and still achieving the results&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 17:28:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82556#M256719</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-05-22T17:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82557#M256720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not merge.&amp;nbsp; The transactions are "overlayed" with the missing check not allowing&amp;nbsp; a missing value to update a nonmissing value.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 19:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82557#M256720</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-05-22T19:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82558#M256721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i thought the reason you created &lt;SPAN style="color: #000000; background-color: #ffffff;"&gt;dummyby&amp;nbsp; was to merge the 2 sets&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 03:31:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82558#M256721</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-05-24T03:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82559#M256722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The BY statement is required when using an UPDATE statement so that the, potentially multiple, transactions can be assigned to the proper record in the master.&amp;nbsp; You are allowed to add new records to the MASTER via UPDATE, hence the use of a MASTER table with no observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data _null_'s twist on the standard UPDATE that makes it work for this type of Last Observation Carried Forward application is to add the OUTPUT statement.&amp;nbsp;&amp;nbsp; So rather than collapsing the whole dataset into one row per BY group the data step emits an observation after each record read from the transaction table.&amp;nbsp; So we end up with the same number of observations as we started with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Missing values in the transaction table do NOT overwrite the values already in the variables, hence the previous value is "carried forward".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 May 2013 04:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82559#M256722</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-05-24T04:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Update missing values from with in Table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82560#M256723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks guys&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 May 2013 03:36:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Update-missing-values-from-with-in-Table/m-p/82560#M256723</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-05-25T03:36:50Z</dc:date>
    </item>
  </channel>
</rss>

