<?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: Filling up and down missing values with non-missing values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411151#M100497</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id  tr1  $ tr2 $; 
cards;
12 AB4D .
12 AB4D MN2X
13 AB4D MN2X
13 .    MN2X
14 AB4D MN2X
14 AB4D MN2X 
;
run;
data temp1;
 set have;
 by id;
 if first.id then n=0;
 n+1;
run;
data temp2;
 update temp1(obs=0) temp1;
 by id;
 output;
run;
proc sort data=temp2;
by id descending n;
run;
data want;
 update temp2(obs=0) temp2;
 by id;
 output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 07 Nov 2017 12:40:11 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2017-11-07T12:40:11Z</dc:date>
    <item>
      <title>Filling up and down missing values with non-missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411008#M100459</link>
      <description>&lt;P&gt;I have following data:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt; input id $2. tr1 $4. tr2 $4.; &lt;BR /&gt;cards;&lt;/P&gt;
&lt;P&gt;12 AB4D &lt;BR /&gt;12 AB4D MN2X&lt;BR /&gt;13 AB4D MN2X&lt;BR /&gt;13 MN2X&lt;BR /&gt;14 AB4D MN2X&lt;BR /&gt;14 AB4D MN2X &lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;I want the output as follows:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;ID&amp;nbsp; &amp;nbsp; t r1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tr2&lt;/P&gt;
&lt;P&gt;12&amp;nbsp; &amp;nbsp;AB4D&amp;nbsp; &amp;nbsp;MN2X&lt;BR /&gt;12&amp;nbsp; &amp;nbsp;AB4D&amp;nbsp; &amp;nbsp;MN2X&lt;BR /&gt;13&amp;nbsp; &amp;nbsp;AB4D&amp;nbsp; &amp;nbsp;MN2X&lt;BR /&gt;13&amp;nbsp; &amp;nbsp;AB4D&amp;nbsp; &amp;nbsp;MN2X&lt;BR /&gt;14&amp;nbsp; &amp;nbsp;AB4D&amp;nbsp; &amp;nbsp;MN2X&lt;BR /&gt;14&amp;nbsp; &amp;nbsp;AB4D&amp;nbsp; &amp;nbsp;MN2X&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anybody help me in getting the missing values&amp;nbsp;filled&amp;nbsp;using SAS?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 22:25:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411008#M100459</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2017-11-06T22:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: Filling up and down missing values with non-missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411009#M100460</link>
      <description>&lt;P&gt;What are the rules?&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 22:29:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411009#M100460</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-06T22:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Filling up and down missing values with non-missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411012#M100461</link>
      <description>&lt;P&gt;Sometimes particular ID may have missing tr2 Value and have only tr1 value. In that case keep only tr1 value and leave tr2 blank&lt;/P&gt;
&lt;P&gt;for example&lt;/P&gt;
&lt;P&gt;15&amp;nbsp; AB4D&lt;/P&gt;
&lt;P&gt;15&amp;nbsp; AB4D&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 22:31:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411012#M100461</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2017-11-06T22:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: Filling up and down missing values with non-missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411013#M100462</link>
      <description>&lt;P&gt;I'm sorry, that's not clear to me. Hopefully someone else understands your question.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2017 22:40:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411013#M100462</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-06T22:40:01Z</dc:date>
    </item>
    <item>
      <title>Re: Filling up and down missing values with non-missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411151#M100497</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id  tr1  $ tr2 $; 
cards;
12 AB4D .
12 AB4D MN2X
13 AB4D MN2X
13 .    MN2X
14 AB4D MN2X
14 AB4D MN2X 
;
run;
data temp1;
 set have;
 by id;
 if first.id then n=0;
 n+1;
run;
data temp2;
 update temp1(obs=0) temp1;
 by id;
 output;
run;
proc sort data=temp2;
by id descending n;
run;
data want;
 update temp2(obs=0) temp2;
 by id;
 output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 07 Nov 2017 12:40:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411151#M100497</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2017-11-07T12:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: Filling up and down missing values with non-missing values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411184#M100520</link>
      <description>&lt;P&gt;Thanks a lot.&amp;nbsp; It helped...&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 14:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Filling-up-and-down-missing-values-with-non-missing-values/m-p/411184#M100520</guid>
      <dc:creator>pp2014</dc:creator>
      <dc:date>2017-11-07T14:01:24Z</dc:date>
    </item>
  </channel>
</rss>

