<?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: Identify missing dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142027#M261646</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, thank you for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Dec 2014 22:40:44 GMT</pubDate>
    <dc:creator>Steelers_In_DC</dc:creator>
    <dc:date>2014-12-08T22:40:44Z</dc:date>
    <item>
      <title>Identify missing dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142021#M261640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am reconciling a large amounts of accounts.&amp;nbsp; I come across many that, over time have missing records.&amp;nbsp; I want to ignore the month before a missing date because I'm unable to reconcile it, not ignore but move it into a separate dataset, any help will be appreciated. I've been trying a few different things starting to move in circles.&amp;nbsp; My mind keeps going to if intnx('month',date,1,'e') exists then output bad; else output good;&amp;nbsp; I understand that doesn't work but that's what I want to get done.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 21:14:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142021#M261640</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-12-08T21:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142022#M261641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some example (both Have and Want) will help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 21:36:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142022#M261641</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-12-08T21:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142023#M261642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I pasted an example below.&amp;nbsp; I've used proc expand to update the dataset, filling in missing values with dates and nulls.&amp;nbsp; Now I would like to delete the record where time_key = . but also delete the record prior.&amp;nbsp; The missing record makes it impossible to reconcile the previous record. &lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;have&lt;/P&gt;&lt;P&gt;date&amp;nbsp; time_key&lt;/P&gt;&lt;P&gt;10/01/07 20071031&lt;BR /&gt;09/01/07 20070930&lt;BR /&gt;08/01/07 20070831&lt;BR /&gt;07/01/07 .&lt;BR /&gt;06/01/07 20070630&lt;BR /&gt;05/01/07 20070531&lt;BR /&gt;04/01/07 20070430&lt;/P&gt;&lt;P&gt;want&lt;/P&gt;&lt;P&gt;date&amp;nbsp; time_key&lt;/P&gt;&lt;P&gt;10/01/07 20071031&lt;BR /&gt;09/01/07 20070930&lt;BR /&gt;06/01/07 20070630&lt;BR /&gt;05/01/07 20070531&lt;BR /&gt;04/01/07 20070430&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 21:50:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142023#M261642</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-12-08T21:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142024#M261643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I noticed an error in what I pasted, I would not delete august, only july (null) and june(july - 1)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 21:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142024#M261643</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-12-08T21:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142025#M261644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So if your data is presorted as being showed here:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; date:&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; time_key;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; date &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;mmddyy10.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;10/01/07 20071031&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;09/01/07 20070930&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;08/01/07 20070831&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;07/01/07 .&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;06/01/07 20070630&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;05/01/07 20070531&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;04/01/07 20070430&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;retain&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; n;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; missing(time_key) &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; n=_n_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; n&amp;lt;=_n_&amp;lt;=n+&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;then&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;drop&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; n;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 22:07:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142025#M261644</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-12-08T22:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142026#M261645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if this will make sense but here's what I want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data final_exp;&lt;/P&gt;&lt;P&gt;set exp;&lt;/P&gt;&lt;P&gt;n+1;&lt;/P&gt;&lt;P&gt;if time_key = . then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; delete %eval(n+1);&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 22:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142026#M261645</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-12-08T22:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Identify missing dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142027#M261646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Awesome, thank you for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Dec 2014 22:40:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Identify-missing-dates/m-p/142027#M261646</guid>
      <dc:creator>Steelers_In_DC</dc:creator>
      <dc:date>2014-12-08T22:40:44Z</dc:date>
    </item>
  </channel>
</rss>

