<?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 data logic in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27664#M5098</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #eef4f9;"&gt;Without sample data I can't test it.&amp;nbsp; But, that said, I think you might want something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;data work.example_new ; &lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; set work.example;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; retain hold_bill_st_date hold_bill_nd_date ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; &lt;SPAN style="background-color: #eef4f9;"&gt;if bill_st_date ne . then &lt;/SPAN&gt;hold_bill_st_date = bill_st_date ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; else bill_sd_date = hold_bill_sd_date ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; &lt;SPAN style="background-color: #eef4f9;"&gt;if bill_nd_date ne . then &lt;/SPAN&gt;hold_bill_nt_date = bill_nt_date ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; else bill_nd_date = hold_bill_nd_date ;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background-color: #eef4f9;"&gt;run ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Jan 2012 23:58:58 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2012-01-10T23:58:58Z</dc:date>
    <item>
      <title>data logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27660#M5094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I have a question regarding logic to my dataset.&lt;/P&gt;&lt;P&gt;an example of my data is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id bill_cycle bill_st_date bill_nd_date action action_date&lt;/P&gt;&lt;P&gt;1 26 01/26/2011 02/27/2011 open 01/26/2011&lt;/P&gt;&lt;P&gt;1 26 . . closed 02/24/2011 &lt;/P&gt;&lt;P&gt;1 26 02/26/2011 03/27/2011 open 02/26/2011&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have certain transactions in my data that do not have a bill_st_date, or bill_nd_date, i want to assign that transaction to bill_st_date and bill_nd_date for the action date that the transaction falls into.&lt;/P&gt;&lt;P&gt;the bill_cycle will always be the bill_st_date's day.&lt;/P&gt;&lt;P&gt;so i'd like it to look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;id bill_cycle bill_st_date bill_nd_date action action_date&lt;/P&gt;&lt;P&gt;1 26 01/26/2011 02/27/2011 open 01/01/2011&lt;/P&gt;&lt;P&gt;1 26 01/26/2011 02/27/2011 closed 02/24/2011 &lt;/P&gt;&lt;P&gt;1 26 02/26/2011 03/27/2011 open 02/26/2011&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 23:09:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27660#M5094</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2012-01-10T23:09:56Z</dc:date>
    </item>
    <item>
      <title>data logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27661#M5095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your data is in time and id-sequential order, or if you can make it so, your question is easy to solve.&amp;nbsp; E.g., if the only missing (to be filled in values) for bill_st_date, you could (in a datastep) create a variable (e.g., hold_bill_st_date), retain it, only change it if it isn't missing and, if it is missing, assign the value of hold_bill_st_date to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would doing something like the above solve your problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 23:19:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27661#M5095</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-10T23:19:43Z</dc:date>
    </item>
    <item>
      <title>data logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27662#M5096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for the quick reply.&lt;/P&gt;&lt;P&gt;i'll give it a try, but my gut feeling is it wont work with this data set, there might be a few exceptions..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 23:30:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27662#M5096</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2012-01-10T23:30:22Z</dc:date>
    </item>
    <item>
      <title>data logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27663#M5097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; i'm not sure if i'm following the holding logic correctly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data work.example_new ; set work.example;&lt;/P&gt;&lt;P&gt;retain hold_bill_st_date hold_bill_nd_date ; &lt;/P&gt;&lt;P&gt;hold_bill_st_date = bill_st_date ;&lt;/P&gt;&lt;P&gt;hold_bill_nd_date = bill_nd_date ; &lt;/P&gt;&lt;P&gt;if bill_nd_date = . then bill_nd_date = hold_bill_nd_date ; &lt;/P&gt;&lt;P&gt;if bill_st_date = . then bill_st_date = hold_bill_st_date ; &lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i dont think the above is working correctly..&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; width: 1px; height: 1px; overflow: hidden; top: 0px; left: -10000px;"&gt;﻿&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 23:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27663#M5097</guid>
      <dc:creator>Danglytics</dc:creator>
      <dc:date>2012-01-10T23:51:12Z</dc:date>
    </item>
    <item>
      <title>data logic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27664#M5098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="background-color: #eef4f9;"&gt;Without sample data I can't test it.&amp;nbsp; But, that said, I think you might want something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;data work.example_new ; &lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; set work.example;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; retain hold_bill_st_date hold_bill_nd_date ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; &lt;SPAN style="background-color: #eef4f9;"&gt;if bill_st_date ne . then &lt;/SPAN&gt;hold_bill_st_date = bill_st_date ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; else bill_sd_date = hold_bill_sd_date ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; &lt;SPAN style="background-color: #eef4f9;"&gt;if bill_nd_date ne . then &lt;/SPAN&gt;hold_bill_nt_date = bill_nt_date ;&lt;/P&gt;&lt;P style="background-color: #eef4f9;"&gt;&amp;nbsp; else bill_nd_date = hold_bill_nd_date ;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="background-color: #eef4f9;"&gt;run ;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jan 2012 23:58:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/data-logic/m-p/27664#M5098</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-01-10T23:58:58Z</dc:date>
    </item>
  </channel>
</rss>

