<?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: Flagging code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Flagging-code/m-p/412861#M100995</link>
    <description>&lt;P&gt;So if your appending data, and presumably this will continue into the future, what happens to new data nest time?&amp;nbsp; Or does this process affect all the data new and old?&amp;nbsp; The logic is simple either way but which you choose depends on your situation:&lt;/P&gt;
&lt;PRE&gt;data want;
  set old new;
  check=ifn(your_date &amp;lt; today(),0,1);
run; &lt;/PRE&gt;
&lt;P&gt;Or:&lt;/P&gt;
&lt;PRE&gt;data new;
  set new;
  check=ifn(your_date &amp;lt; today(),0,1);
run;
data want;
  set old new;
run;&lt;/PRE&gt;
&lt;P&gt;Assumes real datetime.&lt;/P&gt;</description>
    <pubDate>Mon, 13 Nov 2017 12:09:56 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-11-13T12:09:56Z</dc:date>
    <item>
      <title>Flagging code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flagging-code/m-p/412856#M100992</link>
      <description>&lt;P&gt;i am searching for code where it should flag current date &amp;amp; time as 1 and previous all records as 0&lt;/P&gt;&lt;P&gt;e.g. st_date= 13/11/2017 15:30:33 =1&lt;/P&gt;&lt;P&gt;where st_date=13/11/2017 14:30:33 =0;&lt;/P&gt;&lt;P&gt;As i am appending the data to new data set so if it runs multiple times the flag should tag the latest run as 1 rest as 0&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 12:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flagging-code/m-p/412856#M100992</guid>
      <dc:creator>anirudhs</dc:creator>
      <dc:date>2017-11-13T12:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Flagging code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flagging-code/m-p/412858#M100994</link>
      <description>&lt;P&gt;Are you working with a datetime variable or a date and a time variable separately? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Post some example data, that makes it a lot easier to give a usable answer ..&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 12:03:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flagging-code/m-p/412858#M100994</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-11-13T12:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Flagging code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Flagging-code/m-p/412861#M100995</link>
      <description>&lt;P&gt;So if your appending data, and presumably this will continue into the future, what happens to new data nest time?&amp;nbsp; Or does this process affect all the data new and old?&amp;nbsp; The logic is simple either way but which you choose depends on your situation:&lt;/P&gt;
&lt;PRE&gt;data want;
  set old new;
  check=ifn(your_date &amp;lt; today(),0,1);
run; &lt;/PRE&gt;
&lt;P&gt;Or:&lt;/P&gt;
&lt;PRE&gt;data new;
  set new;
  check=ifn(your_date &amp;lt; today(),0,1);
run;
data want;
  set old new;
run;&lt;/PRE&gt;
&lt;P&gt;Assumes real datetime.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Nov 2017 12:09:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Flagging-code/m-p/412861#M100995</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-13T12:09:56Z</dc:date>
    </item>
  </channel>
</rss>

