<?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: How to add missing data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41644#M10786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help data!&amp;nbsp;&amp;nbsp; Your answer is the shortest and most elegant.&amp;nbsp; I will test it first!&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jan 2012 21:09:28 GMT</pubDate>
    <dc:creator>tintin</dc:creator>
    <dc:date>2012-01-30T21:09:28Z</dc:date>
    <item>
      <title>How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41638#M10780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, I have the following data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 320px; border-collapse: collapse;"&gt;&lt;TBODY&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD class="xl22" height="17" style="width: 48pt; height: 12.75pt;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;Year&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;Month&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;Day&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;Hour&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD class="xl22" style="border-left: medium none; width: 48pt;" width="64"&gt;&lt;SPAN style="color: #000000;"&gt;Var&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;E&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;2&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;3&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;E&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR style="height: 12.75pt;"&gt;&lt;TD align="right" class="xl23" height="17" style="border-top: medium none; height: 12.75pt;"&gt;2011&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;1&lt;/TD&gt;&lt;TD align="right" class="xl23" style="border-top: medium none; border-left: medium none;"&gt;4&lt;/TD&gt;&lt;TD class="xl23" style="border-top: medium none; border-left: medium none;"&gt;E&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where Var, if complete, should have data A, B, C, D, E at each hour.&amp;nbsp; However at present, only Hour 1 has the full set of data.&amp;nbsp; Hour 2 has only A, B, D.&amp;nbsp; Hour 3 has only C, D, E.&amp;nbsp; Etc.&amp;nbsp; I would like to add all the missing data in Var at each Hour for the whole Year 2011 (amd other Years too).&amp;nbsp; Is there a simple step for this process?&amp;nbsp; Thanks so much for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 19:08:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41638#M10780</guid>
      <dc:creator>tintin</dc:creator>
      <dc:date>2012-01-30T19:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41639#M10781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;It seems to me you would need a 2X DOW loop:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;infile cards;&lt;/P&gt;&lt;P&gt;input Year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Hour&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Var $;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; D&lt;/P&gt;&lt;P&gt;2011&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=_:);&lt;/P&gt;&lt;P&gt;length _t $40;&lt;/P&gt;&lt;P&gt;retain _t;&lt;/P&gt;&lt;P&gt;do until (last.hour);&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;by year month day hour;&lt;/P&gt;&lt;P&gt;if first.hour then call missing (_t);&lt;/P&gt;&lt;P&gt;_t=cats(_t,var);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do until (last.hour);&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;length _t $40;&lt;/P&gt;&lt;P&gt;by year month day hour;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;if last.hour then do _n_=1 to lengthn(compress('ABCDE',_t));&lt;/P&gt;&lt;P&gt;&amp;nbsp; var=substr(compress('ABCDE',_t),_n_,1);&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kindly Regards,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 19:37:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41639#M10781</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-01-30T19:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41640#M10782</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you need to fill in missing years, months, days and hours as well and, in addition to that, do you also have fields that contain other data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 19:56:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41640#M10782</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-30T19:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41641#M10783</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;if&lt;/SPAN&gt; &lt;STRONG style="color: teal; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;then&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; have(keep=var);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; var @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: #ffffc0;"&gt;A B C D E F&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;;;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;summary&lt;/STRONG&gt; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=have &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;nway&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;classdata&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=class;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;by&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; year--hour;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;class&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt; var;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;output&lt;/SPAN&gt; &lt;SPAN style="font-size: 10pt; color: blue; font-family: 'Courier New'; background-color: white;"&gt;out&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;=expand;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; color: black; font-family: 'Courier New'; background-color: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;STRONG style="color: navy; font-size: 10pt; background-color: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 20:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41641#M10783</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-01-30T20:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41642#M10784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Art297,&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another process have filled in the missing days and hours already so no need to correct these.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And there are fields that contain other data but they are not used in sorting or organizing the data set so I just ignore those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 21:06:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41642#M10784</guid>
      <dc:creator>tintin</dc:creator>
      <dc:date>2012-01-30T21:06:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41643#M10785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much for your help Haikuo!&amp;nbsp; I will test it out later today!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 21:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41643#M10785</guid>
      <dc:creator>tintin</dc:creator>
      <dc:date>2012-01-30T21:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41644#M10786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help data!&amp;nbsp;&amp;nbsp; Your answer is the shortest and most elegant.&amp;nbsp; I will test it first!&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 21:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41644#M10786</guid>
      <dc:creator>tintin</dc:creator>
      <dc:date>2012-01-30T21:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41645#M10787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; PROC SUMMARY is very powerful.:smileyinfo:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 21:12:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41645#M10787</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2012-01-30T21:12:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41646#M10788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;From My understanding,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used hai.kuo HAVE dataset,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data dummy ; &lt;/P&gt;&lt;P&gt;do var='A','B','C','D','E';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; do hours=1 to 4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do year=2011;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table temp as&lt;/P&gt;&lt;P&gt;select a.*,b.month,b.day,b.hour&lt;/P&gt;&lt;P&gt;from dummy a left join have b&lt;/P&gt;&lt;P&gt;on a.year=b.year and a.hours=b.hour and a.var=b.var&lt;/P&gt;&lt;P&gt;order by a.hours,a.var;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set temp;&lt;/P&gt;&lt;P&gt;array v(3) month hour day;&lt;/P&gt;&lt;P&gt;do i=1 to dim(v);&lt;/P&gt;&lt;P&gt;&amp;nbsp; if v(i)=. then v(i)=0;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;drop i;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;might be some one will give elegant answer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 21:30:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41646#M10788</guid>
      <dc:creator>sam369</dc:creator>
      <dc:date>2012-01-30T21:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41647#M10789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a generic approach.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; create table list1 as select distinct year, month, day, hour from original;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; create table list2 as select distinct var from original;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; create table complete_shell as select * from list1, list2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; order by year, month, day, hour, var;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The advantage:&amp;nbsp; You don't need any prior knowledge about values of VAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The disadvantage:&amp;nbsp; It only takes values for VAR that actually appear in the data.&amp;nbsp; So if you want some VAR=B records, but there are no VAR=B records in the data, you won't get them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want some other variables that are part of the original data, they would be easy to merge back in at this point.&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>Mon, 30 Jan 2012 21:51:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41647#M10789</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2012-01-30T21:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41648#M10790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to express profusely my thanks to everyone who replied with helpful solutions.&amp;nbsp; Orignially I had wanted to test all the methods but the number of solutions out-grew the amount of time I have to test each one.&amp;nbsp; Finally then I tried the method from Astounding because it looks short and simple, and it works!&amp;nbsp;&amp;nbsp; Thanks Astounding!&amp;nbsp;&amp;nbsp; And thanks again everyone! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jan 2012 22:33:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/41648#M10790</guid>
      <dc:creator>tintin</dc:creator>
      <dc:date>2012-01-30T22:33:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to add missing data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/359256#M64379</link>
      <description>you'd have to sort the data first though before proc summary. Is there a way around that?</description>
      <pubDate>Wed, 17 May 2017 05:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-add-missing-data/m-p/359256#M64379</guid>
      <dc:creator>modsoul1</dc:creator>
      <dc:date>2017-05-17T05:21:51Z</dc:date>
    </item>
  </channel>
</rss>

