<?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: Adding extra years for each observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358104#M274361</link>
    <description>Thank you very much for your reply. Your code adds two additional years:&lt;BR /&gt;1976 and 2017 after each observation but it also copies the other variables&lt;BR /&gt;associated with last reported year of each observation in the missing year.&lt;BR /&gt;I want the two additional year and all the variables associated with the&lt;BR /&gt;year missing (.). Could you please modify your code to do it? I have added&lt;BR /&gt;an excel file with my original data and expected SAS output.&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
    <pubDate>Fri, 12 May 2017 03:28:29 GMT</pubDate>
    <dc:creator>nazmul</dc:creator>
    <dc:date>2017-05-12T03:28:29Z</dc:date>
    <item>
      <title>Adding extra years for each observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358091#M274358</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to add year 12/31/1971 and 12/31/1986 to each ID. Can anyone please help me to do it. I have attached an excel file with sample data. I will be grateful if anyone can help me.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 02:13:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358091#M274358</guid>
      <dc:creator>nazmul</dc:creator>
      <dc:date>2017-05-12T02:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding extra years for each observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358093#M274359</link>
      <description>&lt;P&gt;Use BY groups again and LAST with explicit OUTPUT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want; 
set have;
by id;

output;

if last.id then do;
    date='01Jan2017'd; output;
    date='02Jan2017'd; output;
end;

run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/143540"&gt;@nazmul&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to add year 12/31/1971 and 12/31/1986 to each ID. Can anyone please help me to do it. I have attached an excel file with sample data. I will be grateful if anyone can help me.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 02:31:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358093#M274359</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-12T02:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Adding extra years for each observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358103#M274360</link>
      <description>Thank you very much for your reply. Your code adds two additional years:&lt;BR /&gt;1976 and 2017 after each observation but it also copies the other variables&lt;BR /&gt;associated with last reported year of each observation in the missing year.&lt;BR /&gt;I want the two additional year and all the variables associated with the&lt;BR /&gt;year missing (.). Could you please modify your code to do it? I have added&lt;BR /&gt;an excel file with my original data and expected SAS output.&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Fri, 12 May 2017 03:28:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358103#M274360</guid>
      <dc:creator>nazmul</dc:creator>
      <dc:date>2017-05-12T03:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: Adding extra years for each observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358104#M274361</link>
      <description>Thank you very much for your reply. Your code adds two additional years:&lt;BR /&gt;1976 and 2017 after each observation but it also copies the other variables&lt;BR /&gt;associated with last reported year of each observation in the missing year.&lt;BR /&gt;I want the two additional year and all the variables associated with the&lt;BR /&gt;year missing (.). Could you please modify your code to do it? I have added&lt;BR /&gt;an excel file with my original data and expected SAS output.&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Fri, 12 May 2017 03:28:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358104#M274361</guid>
      <dc:creator>nazmul</dc:creator>
      <dc:date>2017-05-12T03:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Adding extra years for each observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358108#M274362</link>
      <description>&lt;P&gt;1. There's no attachment&lt;/P&gt;
&lt;P&gt;2. Set the values to missing manually or use call missing() in the do condition.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 03:57:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358108#M274362</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-05-12T03:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Adding extra years for each observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358125#M274363</link>
      <description>&lt;P&gt;Thank you. I set other variable as missing with if function.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 05:07:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Adding-extra-years-for-each-observation/m-p/358125#M274363</guid>
      <dc:creator>nazmul</dc:creator>
      <dc:date>2017-05-12T05:07:35Z</dc:date>
    </item>
  </channel>
</rss>

