<?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 Replacing a Date for a New Date in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Replacing-a-Date-for-a-New-Date/m-p/400296#M25736</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have records that are populated for each month of the calendar year that have a column for points.&amp;nbsp;Points change per month.&amp;nbsp;There is also one record per month. For example, John Smith has one record for Jan, one record for Feb, etc.&amp;nbsp; I pull this report every month so the reporting month changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to freeze his&amp;nbsp;points on a specific month without impacting the other people in the dataset. So if I want to freeze his results as of June then I would not want to see July, Aug, Spet, or October on the report.&amp;nbsp; As of right now I used an excel doc to import names of people I wanted to do this for and have excluded months that I don't want (these months are indicated on the excel sheet). I.e. in the excel sheet i have John Smith and July 1, 2017.&amp;nbsp; So I excluded based on the date but I'm unsure of how to REPLACE the JUNE month with September so that September comes through with populated data of July. I tried to use a prompt but am unsure of how to go about doing this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this makes sense!&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2017 15:01:54 GMT</pubDate>
    <dc:creator>mmagnuson</dc:creator>
    <dc:date>2017-10-02T15:01:54Z</dc:date>
    <item>
      <title>Replacing a Date for a New Date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Replacing-a-Date-for-a-New-Date/m-p/400296#M25736</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have records that are populated for each month of the calendar year that have a column for points.&amp;nbsp;Points change per month.&amp;nbsp;There is also one record per month. For example, John Smith has one record for Jan, one record for Feb, etc.&amp;nbsp; I pull this report every month so the reporting month changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to freeze his&amp;nbsp;points on a specific month without impacting the other people in the dataset. So if I want to freeze his results as of June then I would not want to see July, Aug, Spet, or October on the report.&amp;nbsp; As of right now I used an excel doc to import names of people I wanted to do this for and have excluded months that I don't want (these months are indicated on the excel sheet). I.e. in the excel sheet i have John Smith and July 1, 2017.&amp;nbsp; So I excluded based on the date but I'm unsure of how to REPLACE the JUNE month with September so that September comes through with populated data of July. I tried to use a prompt but am unsure of how to go about doing this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this makes sense!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 15:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Replacing-a-Date-for-a-New-Date/m-p/400296#M25736</guid>
      <dc:creator>mmagnuson</dc:creator>
      <dc:date>2017-10-02T15:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing a Date for a New Date</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Replacing-a-Date-for-a-New-Date/m-p/400312#M25737</link>
      <description>&lt;P&gt;Suppose dataset have has id, date, and points. Dataset updates has id and date.&lt;/P&gt;
&lt;P&gt;Sort both datasets by id and date, then run&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
merge
  have (in=a)
  updates (in=b)
;
by id date;
retain save_points;
if a;
if first.id then save_points = .;
if b then save_points = points;
if save_points ne . then points = save_points;
drop save_points;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2017 15:38:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Replacing-a-Date-for-a-New-Date/m-p/400312#M25737</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-10-02T15:38:03Z</dc:date>
    </item>
  </channel>
</rss>

