<?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: Fill in the missing values with the previous values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/234358#M42856</link>
    <description>I realy like your solution. It works fine for me. Bur for learning purposes I try to understand why you need the obs=0 option. Can you explain?</description>
    <pubDate>Thu, 12 Nov 2015 10:45:12 GMT</pubDate>
    <dc:creator>bvdnberg</dc:creator>
    <dc:date>2015-11-12T10:45:12Z</dc:date>
    <item>
      <title>Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228106#M41167</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I tried to fill the blanks with the previous values, as show below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is the original data look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="5" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl65" style="height: 15.0pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;VISIT&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;value1&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;value2&lt;/TD&gt;
&lt;TD width="64" class="xl65" style="border-left: none; width: 48pt;"&gt;value3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl63" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl63" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;16&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl64" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl64" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;18&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;
&lt;TD align="right" class="xl64" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;this is what I want &amp;nbsp;--- &amp;nbsp;fill the blank with the previous data.&lt;/P&gt;
&lt;P&gt;so A2 is filling with A1 values as well as A3 and so on.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 240pt;" border="0" width="320" cellspacing="0" cellpadding="0"&gt;&lt;COLGROUP&gt;&lt;COL style="width: 48pt;" span="5" width="64" /&gt; &lt;/COLGROUP&gt;
&lt;TBODY&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD width="64" height="20" class="xl67" style="height: 15.0pt; width: 48pt;"&gt;ID&lt;/TD&gt;
&lt;TD width="64" class="xl67" style="border-left: none; width: 48pt;"&gt;VISIT&lt;/TD&gt;
&lt;TD width="64" class="xl67" style="border-left: none; width: 48pt;"&gt;value1&lt;/TD&gt;
&lt;TD width="64" class="xl67" style="border-left: none; width: 48pt;"&gt;value2&lt;/TD&gt;
&lt;TD width="64" class="xl67" style="border-left: none; width: 48pt;"&gt;value3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;7&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;9&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;7&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;9&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;10&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl65" style="height: 15.0pt; border-top: none;"&gt;A&lt;/TD&gt;
&lt;TD align="right" class="xl65" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;10&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;5&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;3&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;11&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;6&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;2&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;11&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;2&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;6&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;3&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;16&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;7&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;9&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;4&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;16&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;7&lt;/FONT&gt;&lt;/TD&gt;
&lt;TD align="right" class="xl68" style="border-top: none; border-left: none;"&gt;&lt;FONT color="#FF0000"&gt;9&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 15.0pt;"&gt;
&lt;TD height="20" class="xl66" style="height: 15.0pt; border-top: none;"&gt;B&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;18&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;20&lt;/TD&gt;
&lt;TD align="right" class="xl66" style="border-top: none; border-left: none;"&gt;5&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wonder how to write the codes to get what I want.&lt;/P&gt;
&lt;P&gt;Any help will be very appreciate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 19:18:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228106#M41167</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2015-10-01T19:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228109#M41169</link>
      <description>&lt;P&gt;data want; update have (obs=0) have; by id; output; run;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 19:38:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228109#M41169</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-10-01T19:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228110#M41170</link>
      <description>&lt;P&gt;Here you go.&amp;nbsp; If you real data is much different than what you provided there might be a much better route:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;infile cards;&lt;BR /&gt;input ID$ &amp;nbsp;&amp;nbsp; &amp;nbsp;VISIT &amp;nbsp;&amp;nbsp; &amp;nbsp;value1 &amp;nbsp;&amp;nbsp; &amp;nbsp;value2 &amp;nbsp;&amp;nbsp; &amp;nbsp;value3;&lt;BR /&gt;cards;&lt;BR /&gt;A &amp;nbsp;&amp;nbsp; &amp;nbsp;1 &amp;nbsp;&amp;nbsp; &amp;nbsp;5 &amp;nbsp;&amp;nbsp; &amp;nbsp;7 &amp;nbsp;&amp;nbsp; &amp;nbsp;9&lt;BR /&gt;A &amp;nbsp;&amp;nbsp; &amp;nbsp;2 &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;A &amp;nbsp;&amp;nbsp; &amp;nbsp;3 &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;A &amp;nbsp;&amp;nbsp; &amp;nbsp;4 &amp;nbsp;&amp;nbsp; &amp;nbsp;10 &amp;nbsp;&amp;nbsp; &amp;nbsp;5 &amp;nbsp;&amp;nbsp; &amp;nbsp;3&lt;BR /&gt;A &amp;nbsp;&amp;nbsp; &amp;nbsp;5 &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;B &amp;nbsp;&amp;nbsp; &amp;nbsp;1 &amp;nbsp;&amp;nbsp; &amp;nbsp;11 &amp;nbsp;&amp;nbsp; &amp;nbsp;2 &amp;nbsp;&amp;nbsp; &amp;nbsp;6&lt;BR /&gt;B &amp;nbsp;&amp;nbsp; &amp;nbsp;2 &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;B &amp;nbsp;&amp;nbsp; &amp;nbsp;3 &amp;nbsp;&amp;nbsp; &amp;nbsp;16 &amp;nbsp;&amp;nbsp; &amp;nbsp;7 &amp;nbsp;&amp;nbsp; &amp;nbsp;9&lt;BR /&gt;B &amp;nbsp;&amp;nbsp; &amp;nbsp;4 &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;B &amp;nbsp;&amp;nbsp; &amp;nbsp;5 &amp;nbsp;&amp;nbsp; &amp;nbsp;18 &amp;nbsp;&amp;nbsp; &amp;nbsp;20 &amp;nbsp;&amp;nbsp; &amp;nbsp;5&lt;BR /&gt;;&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;retain _value1 _value2 _value3;&lt;BR /&gt;if not missing(value1) then _value1 = value1;&lt;BR /&gt;if not missing(value2) then _value2 = value2;&lt;BR /&gt;if not missing(value3) then _value3 = value3;&lt;BR /&gt;if missing(value1) then value1 = _value1;&lt;BR /&gt;if missing(value2) then value2 = _value2;&lt;BR /&gt;if missing(value3) then value3 = _value3;&lt;BR /&gt;drop _:;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 19:39:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228110#M41170</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2015-10-01T19:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228124#M41173</link>
      <description>&lt;P&gt;thanks so much for the codes.&lt;/P&gt;
&lt;P&gt;It works!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about if&amp;nbsp;I have more variables to fill them in, upto 50 variables for example, I know I can use your codes by writing each of the variables names.&lt;/P&gt;
&lt;P&gt;I wonder is there any other more simple codes to write upto 50 variables names to fill in?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 20:11:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228124#M41173</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2015-10-01T20:11:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228131#M41174</link>
      <description>&lt;P&gt;I bet you haven't tried the solution by&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding﻿&lt;/a&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 20:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228131#M41174</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-10-01T20:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228145#M41176</link>
      <description>&lt;P&gt;Yes, it works!!&lt;/P&gt;
&lt;P&gt;It's very helpful!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I really appreciate to all of you for the solution.&lt;/P&gt;
&lt;P&gt;you have made the community such a wonderful place to ask question and get the solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks every body!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2015 22:27:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/228145#M41176</guid>
      <dc:creator>ursula</dc:creator>
      <dc:date>2015-10-01T22:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/231295#M42054</link>
      <description>&lt;P&gt;Another solution to your requirement would be the use of LAG () function which can help. &amp;nbsp;Well, you already have a few solutions and perhaps might have this in your pocket available too some day..&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good Luck to you...!!!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Oct 2015 01:48:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/231295#M42054</guid>
      <dc:creator>kannand</dc:creator>
      <dc:date>2015-10-23T01:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/234358#M42856</link>
      <description>I realy like your solution. It works fine for me. Bur for learning purposes I try to understand why you need the obs=0 option. Can you explain?</description>
      <pubDate>Thu, 12 Nov 2015 10:45:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/234358#M42856</guid>
      <dc:creator>bvdnberg</dc:creator>
      <dc:date>2015-11-12T10:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/360102#M84717</link>
      <description>&lt;P&gt;Hi, I faced the same problem and tried to use array function. I think I messed up somewhere in the array function. I want to use array function in this problem. Could anyone please tell me what is the problem in my code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DATA want;&lt;BR /&gt;SET have;&lt;BR /&gt;array value[*] value1-value3;&lt;BR /&gt;array _variable[3];&lt;BR /&gt;retain _variable[i];&lt;BR /&gt;if not missing(value[i]) then _variable [i] =value [i];&lt;BR /&gt;else value [i]=_variable [i];&lt;BR /&gt;drop _variable[i];&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 20:02:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/360102#M84717</guid>
      <dc:creator>nazmul</dc:creator>
      <dc:date>2017-05-19T20:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: Fill in the missing values with the previous values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/360103#M84718</link>
      <description>&lt;P&gt;Hi, I faced the same problem and tried to use array function. I think I messed up somewhere in the array function. I want to use array function in this problem. Could anyone please tell me what is the problem in my code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;DATA want;&lt;BR /&gt;SET have;&lt;BR /&gt;array value[*] value1-value3;&lt;BR /&gt;array _variable[3];&lt;BR /&gt;retain _variable[i];&lt;BR /&gt;if not missing(value[i]) then _variable [i] =value [i];&lt;BR /&gt;else value [i]=_variable [i];&lt;BR /&gt;drop _variable[i];&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2017 20:02:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Fill-in-the-missing-values-with-the-previous-values/m-p/360103#M84718</guid>
      <dc:creator>nazmul</dc:creator>
      <dc:date>2017-05-19T20:02:52Z</dc:date>
    </item>
  </channel>
</rss>

