<?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: Macro help creating a rolling 12 months in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-help-creating-a-rolling-12-months/m-p/327357#M73014</link>
    <description>&lt;P&gt;You can use the search functionality on this forum, there are hundreds of posts on this subject:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/forums/searchpage/tab/message?q=rolling+window" target="_blank"&gt;https://communities.sas.com/t5/forums/searchpage/tab/message?q=rolling+window&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2017 12:36:32 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-01-25T12:36:32Z</dc:date>
    <item>
      <title>Macro help creating a rolling 12 months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-help-creating-a-rolling-12-months/m-p/327335#M73008</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need help in creating a macro around my simple query to report a rolling 12 months, anyone able to help me please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; mon=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(intnx(month,&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%sysfunc&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(today()),&amp;amp;i.),yymmn6.);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; i=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;%to&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;12&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; pootsDefs;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; mortbib.mort_&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;mon.&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;(&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;keep&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;=mort snap bal);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 10:54:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-help-creating-a-rolling-12-months/m-p/327335#M73008</guid>
      <dc:creator>anonymous_user</dc:creator>
      <dc:date>2017-01-25T10:54:51Z</dc:date>
    </item>
    <item>
      <title>Re: Macro help creating a rolling 12 months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-help-creating-a-rolling-12-months/m-p/327338#M73009</link>
      <description>&lt;P&gt;Try this code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro month;
%do i=1 %to 12;
%let mon=%sysfunc(intnx(month,%sysfunc(today()),&amp;amp;i),yymmn6.);

data work.mort_&amp;amp;mon.;
set sashelp.class;
run;
%end;
%mend;

%month

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Jan 2017 11:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-help-creating-a-rolling-12-months/m-p/327338#M73009</guid>
      <dc:creator>Kalind_Patel</dc:creator>
      <dc:date>2017-01-25T11:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Macro help creating a rolling 12 months</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-help-creating-a-rolling-12-months/m-p/327357#M73014</link>
      <description>&lt;P&gt;You can use the search functionality on this forum, there are hundreds of posts on this subject:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/forums/searchpage/tab/message?q=rolling+window" target="_blank"&gt;https://communities.sas.com/t5/forums/searchpage/tab/message?q=rolling+window&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2017 12:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-help-creating-a-rolling-12-months/m-p/327357#M73014</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-01-25T12:36:32Z</dc:date>
    </item>
  </channel>
</rss>

