<?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: Creating Daily Records in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31667#M7553</link>
    <description>Hey Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Sorry for the 'daily records' terminology, I should have been more specific.  Your example of the 'new' dataset is exactly what I am looking for.  Yes, I would like a SAS dataset.  I currently have a SAS dataset with the data in the format of my original post.  Thanks for your response.&lt;BR /&gt;
&lt;BR /&gt;
Tyler</description>
    <pubDate>Thu, 17 Mar 2011 04:19:59 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2011-03-17T04:19:59Z</dc:date>
    <item>
      <title>Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31664#M7550</link>
      <description>I have data in the format:&lt;BR /&gt;
&lt;BR /&gt;
&lt;U&gt;ARMYID&lt;/U&gt;   &lt;U&gt;DATE&lt;/U&gt;    &lt;U&gt;RANK&lt;/U&gt;    &lt;U&gt;PAY&lt;/U&gt; &lt;BR /&gt;
103164              2/7/2007         O-1                 $8.20&lt;BR /&gt;
103164              4/6/2008         O-3                 $8.70 &lt;BR /&gt;
103164              9/17/2009      O-5                 $10.25&lt;BR /&gt;
475405              6/14/2007      E-4                 $15.35 &lt;BR /&gt;
475405              9/28/2008      E-6                 $18.40&lt;BR /&gt;
475405              5/11/2009      E-8                 $22.90&lt;BR /&gt;
589071              9/9/2007         O-7                 $14.10&lt;BR /&gt;
589071              2/30/2008     O-9                 $19.65&lt;BR /&gt;
589071              4/19/2009     O-11               $28.80&lt;BR /&gt;
&lt;BR /&gt;
I need to create daily records for each ARMYID from the date of enlistment to 12/31/2009 assuming that rank and pay remain constant between dates.  I feel that with first and last variables, a do loop, and the output statement that I should be able to create these records however I can't seem as of now to write a code that will do this.  Any help would be greatly appreciated.  Thanks in advance.&lt;BR /&gt;
&lt;BR /&gt;
Tyler</description>
      <pubDate>Thu, 17 Mar 2011 00:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31664#M7550</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-17T00:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31665#M7551</link>
      <description>Hi.&lt;BR /&gt;
What does your output look like?&lt;BR /&gt;
Post is not very clarify.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 17 Mar 2011 02:45:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31665#M7551</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-17T02:45:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31666#M7552</link>
      <description>Hi:&lt;BR /&gt;
  I'm not sure what you mean when you say that you need to "create daily records" for each ARMYID. For example, you have this for ID 103164:&lt;BR /&gt;
[pre]&lt;BR /&gt;
ARMYID DATE       RANK PAY &lt;BR /&gt;
103164 2/7/2007   O-1  $8.20&lt;BR /&gt;
103164 4/6/2008   O-3  $8.70 &lt;BR /&gt;
103164 9/17/2009  O-5  $10.25&lt;BR /&gt;
[/pre]&lt;BR /&gt;
        &lt;BR /&gt;
And what I think you want to generate is one observation for each day that they held the O-1 rank, and then generate one observation for each day that they held the O-3 rank, etc. So that the "new" dataset looks like this (white space added for readability only):&lt;BR /&gt;
[pre]&lt;BR /&gt;
ARMYID DATE       RANK PAY &lt;BR /&gt;
103164 2/7/2007   O-1  $8.20&lt;BR /&gt;
103164 2/8/2007   O-1  $8.20&lt;BR /&gt;
103164 2/9/2007   O-1  $8.20&lt;BR /&gt;
103164 2/10/2007  O-1  $8.20&lt;BR /&gt;
103164 2/11/2007  O-1  $8.20&lt;BR /&gt;
...more observations...&lt;BR /&gt;
103164 4/5/2008   O-1  $8.20&lt;BR /&gt;
                   &lt;BR /&gt;
103164 4/6/2008   O-3  $8.70 &lt;BR /&gt;
103164 4/7/2008   O-3  $8.70 &lt;BR /&gt;
103164 4/8/2008   O-3  $8.70 &lt;BR /&gt;
103164 4/9/2008   O-3  $8.70 &lt;BR /&gt;
...more observations...&lt;BR /&gt;
103164 9/16/2009  O-3  $8.70 &lt;BR /&gt;
                   &lt;BR /&gt;
103164 9/17/2009  O-5  $10.25&lt;BR /&gt;
... more observations...&lt;BR /&gt;
103164 12/31/2009 O-5  $10.25&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Can you clarify what your desired output should look like? Do you want a SAS dataset or do you just want a report of some kind that shows the total amount of money they made at each level??&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 17 Mar 2011 02:55:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31666#M7552</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-03-17T02:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31667#M7553</link>
      <description>Hey Cynthia,&lt;BR /&gt;
&lt;BR /&gt;
Sorry for the 'daily records' terminology, I should have been more specific.  Your example of the 'new' dataset is exactly what I am looking for.  Yes, I would like a SAS dataset.  I currently have a SAS dataset with the data in the format of my original post.  Thanks for your response.&lt;BR /&gt;
&lt;BR /&gt;
Tyler</description>
      <pubDate>Thu, 17 Mar 2011 04:19:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31667#M7553</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-03-17T04:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31668#M7554</link>
      <description>OK.&lt;BR /&gt;
That is much more complicated than I image.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data temp;&lt;BR /&gt;
input ARMYID $ DATE : mmddyy10. RANK $ PAY : dollar10.;&lt;BR /&gt;
format date mmddyy10. pay dollar10.2;&lt;BR /&gt;
datalines;&lt;BR /&gt;
103164 2/7/2007 O-1 $8.20&lt;BR /&gt;
103164 4/6/2008 O-3 $8.70&lt;BR /&gt;
103164 9/17/2009 O-5 $10.25&lt;BR /&gt;
475405 6/14/2007 E-4 $15.35&lt;BR /&gt;
475405 9/28/2008 E-6 $18.40&lt;BR /&gt;
475405 5/11/2009 E-8 $22.90&lt;BR /&gt;
589071 9/9/2007 O-7 $14.10&lt;BR /&gt;
589071 2/28/2008 O-9 $19.65&lt;BR /&gt;
589071 4/19/2009 O-11 $28.80&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: navy; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;proc&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: navy; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;sort&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;=temp;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;by&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;SPAN class="SpellE"&gt;armyid&lt;/SPAN&gt; date;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN class="GramE"&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: navy; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN class="GramE"&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: navy; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;data&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; result;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;set&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; temp;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;by&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;SPAN class="SpellE"&gt;armyid&lt;/SPAN&gt; ;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;start=&lt;/SPAN&gt;lag(date);end=date;&lt;BR /&gt;
_rank=lag(rank);_pay=lag(pay); r=&lt;SPAN class="SpellE"&gt;rank;p&lt;/SPAN&gt;=pay;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;if&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;SPAN class="SpellE"&gt;first.armyid&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;output&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;else&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;output&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;do&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;SPAN class="SpellE"&gt;i&lt;/SPAN&gt;=start+&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: teal; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;1&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; end-&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: teal; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;1&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;date&lt;/SPAN&gt;= &lt;SPAN class="SpellE"&gt;i;rank&lt;/SPAN&gt;=_&lt;SPAN class="SpellE"&gt;rank;pay&lt;/SPAN&gt;=_pay;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;output&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;end&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;end&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;if&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;SPAN class="SpellE"&gt;last.armyid&lt;/SPAN&gt; and (end &lt;SPAN class="SpellE"&gt;lt&lt;/SPAN&gt; &lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: teal; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;'31dec2009'd&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; ) &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;; &lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;do&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; j=end+&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: teal; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;1&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;to&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: teal; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;'31dec2009'd&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; ;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;date=&lt;/SPAN&gt;j; rank=&lt;SPAN class="SpellE"&gt;r;pay&lt;/SPAN&gt;=p;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
&lt;/SPAN&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;output&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;end&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&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;
&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;end&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;drop&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;SPAN class="SpellE"&gt;i&lt;/SPAN&gt; j r p start end _: ;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN class="GramE"&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: navy; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN class="GramE"&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: navy; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;proc&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: navy; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;sort&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;data&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;=result;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;by&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt; &lt;SPAN class="SpellE"&gt;armyid&lt;/SPAN&gt; date;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN class="GramE"&gt;&lt;B&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: navy; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN lang="EN-US"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2011 07:40:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31668#M7554</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-17T07:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31669#M7555</link>
      <description>If you look ahead instead of back the problem is much easier.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
data days;&lt;BR /&gt;
   set temp end=eof;&lt;BR /&gt;
   by armyid;&lt;BR /&gt;
   if not eof then set temp(firstobs=2 keep=date rename=date=nxdate);&lt;BR /&gt;
   do date = date to ifn(last.armyid,'31dec2009'd,nxdate-1);&lt;BR /&gt;
      output;&lt;BR /&gt;
      end;&lt;BR /&gt;
   drop nxdate;&lt;BR /&gt;
   run;&lt;BR /&gt;
proc compare base=result compare=days note;&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: No unequal values were found. All values compared are exactly equal.&lt;BR /&gt;
NOTE: The data sets WORK.RESULT and WORK.DAYS are equal in all respects.&lt;BR /&gt;
NOTE: There were 2836 observations read from the data set WORK.RESULT.&lt;BR /&gt;
NOTE: There were 2836 observations read from the data set WORK.DAYS.&lt;BR /&gt;
[/pre]</description>
      <pubDate>Thu, 17 Mar 2011 11:42:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31669#M7555</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-03-17T11:42:03Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31670#M7556</link>
      <description>Hi. Great.&lt;BR /&gt;
I do not even consider about the skill mentioned by Peter.C before.&lt;BR /&gt;
But there is a problem . When last.armyid has a date greater than 2009-12-31, then the &lt;BR /&gt;
result of you and me will have little different. Look below:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;DIV class="Section1" style=""&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN class="SpellE"&gt;&lt;SPAN class="GramE"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: blue; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;datalines&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% white;" lang="EN-US"&gt;;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;103164 &lt;CHSDATE year="2007" month="2" day="7" islunardate="False" isrocdate="False" st="on"&gt;2/7/2007&lt;/CHSDATE&gt;&lt;BR /&gt;
O-1 $8.20&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;103164 &lt;CHSDATE year="2008" month="4" day="6" islunardate="False" isrocdate="False" st="on"&gt;4/6/2008&lt;/CHSDATE&gt;&lt;BR /&gt;
O-3 $8.70&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;103164 &lt;CHSDATE year="2010" month="1" day="2" islunardate="False" isrocdate="False" st="on"&gt;&lt;SPAN style="background: none repeat scroll 0% 0% yellow;"&gt;1/2/2010&lt;/SPAN&gt;&lt;/CHSDATE&gt;&lt;BR /&gt;
O-5 $10.25&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;475405 &lt;CHSDATE year="2007" month="6" day="14" islunardate="False" isrocdate="False" st="on"&gt;6/14/2007&lt;/CHSDATE&gt;&lt;BR /&gt;
E-4 $15.35&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;475405 &lt;CHSDATE year="2008" month="9" day="28" islunardate="False" isrocdate="False" st="on"&gt;9/28/2008&lt;/CHSDATE&gt;&lt;BR /&gt;
E-6 $18.40&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;475405 &lt;CHSDATE year="2009" month="5" day="11" islunardate="False" isrocdate="False" st="on"&gt;5/11/2009&lt;/CHSDATE&gt;&lt;BR /&gt;
E-8 $22.90&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;589071 &lt;CHSDATE year="2007" month="9" day="9" islunardate="False" isrocdate="False" st="on"&gt;9/9/2007&lt;/CHSDATE&gt;&lt;BR /&gt;
O-7 $14.10&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;589071 &lt;CHSDATE year="2008" month="2" day="28" islunardate="False" isrocdate="False" st="on"&gt;2/28/2008&lt;/CHSDATE&gt;&lt;BR /&gt;
O-9 $19.65&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;589071 &lt;CHSDATE year="2009" month="4" day="19" islunardate="False" isrocdate="False" st="on"&gt;4/19/2009&lt;/CHSDATE&gt;&lt;BR /&gt;
O-11 $28.80&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 10pt; font-family: &amp;quot;Courier New&amp;quot;; color: black; background: none repeat scroll 0% 0% rgb(255, 255, 192);" lang="EN-US"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;;" lang="EN-US"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;; color: blue;" lang="EN-US"&gt;NOTE: &lt;SPAN style="background: none repeat scroll 0% 0% yellow;"&gt;Data set&lt;BR /&gt;
WORK.RESULT contains 1 &lt;SPAN class="GramE"&gt;observations&lt;/SPAN&gt; not in WORK.DAYS.&lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;; color: blue;" lang="EN-US"&gt;NOTE: Values of the following 4 variables compare unequal: ARMYID DATE RANK&lt;BR /&gt;
PAY&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;; color: blue;" lang="EN-US"&gt;NOTE: The data sets WORK.RESULT and WORK.DAYS contain unequal values.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;; color: blue;" lang="EN-US"&gt;NOTE: There were 2838 observations read from the data set WORK.RESULT.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;; color: blue;" lang="EN-US"&gt;NOTE: There were 2837 observations read from the data set WORK.DAYS.&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;; color: blue;" lang="EN-US"&gt;NOTE: PROCEDURE COMPARE used (Total process time):&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal" style="text-align: left;" align="left"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;; color: blue;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="GramE"&gt;real&lt;/SPAN&gt; time&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;
&lt;BR /&gt;
&lt;/SPAN&gt;1.78 seconds&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;P class="MsoNormal"&gt;&lt;SPAN style="font-size: 8pt; font-family: &amp;quot;SAS Monospace&amp;quot;; color: blue;" lang="EN-US"&gt;&lt;SPAN style=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="SpellE"&gt;&lt;SPAN class="GramE"&gt;cpu&lt;/SPAN&gt;&lt;/SPAN&gt; time&lt;SPAN style=""&gt;&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;
&lt;/SPAN&gt;0.10 seconds&lt;/SPAN&gt;&lt;SPAN style="color: blue;" lang="EN-US"&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;/DIV&gt;&lt;BR /&gt;
[pre]&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Fri, 18 Mar 2011 01:59:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31670#M7556</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-18T01:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31671#M7557</link>
      <description>Oh dear, you've change the rules.&lt;BR /&gt;
&lt;BR /&gt;
[pre]max('31dec2009'd,date)[/pre]</description>
      <pubDate>Fri, 18 Mar 2011 11:47:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31671#M7557</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-03-18T11:47:31Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Daily Records</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31672#M7558</link>
      <description>Hi.&lt;BR /&gt;
I know.OP only want before '31dec2009'd date,&lt;BR /&gt;
But Isn't keeping integrated obs from origin data better than deleting them?&lt;BR /&gt;
Maybe in some case, there are some obs after '31dec2009'd date? You see?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
Ksharp</description>
      <pubDate>Sat, 19 Mar 2011 02:36:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Creating-Daily-Records/m-p/31672#M7558</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-03-19T02:36:24Z</dc:date>
    </item>
  </channel>
</rss>

