<?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: How to create a Macro loop of YYYY-MM and a variable increment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837479#M331124</link>
    <description>&lt;P&gt;I am not sure what you are asking for.&amp;nbsp; You already have a counter variable, you named in I for some reason.&amp;nbsp; Just rename it to the new name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro date_loop(start,end);
%let start=%sysfunc(inputn(&amp;amp;start,anydtdte9.));
%let end=%sysfunc(inputn(&amp;amp;end,anydtdte9.)); 
%do variable_name_time=1 %to %sysfunc(intck(month,&amp;amp;start,&amp;amp;end))+1;
  %let yr_mon=%sysfunc(intnx(month,&amp;amp;start,&amp;amp;variable_name_time-1,b),YYMMD7.); 
  %put &amp;amp;=yr_mon &amp;amp;=variable_name_time;
%end;
%mend date_loop;
%date_loop(01APR2021,01SEP2021);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;119  %date_loop(01APR2021,01SEP2021);
YR_MON=2021-04 VARIABLE_NAME_TIME=1
YR_MON=2021-05 VARIABLE_NAME_TIME=2
YR_MON=2021-06 VARIABLE_NAME_TIME=3
YR_MON=2021-07 VARIABLE_NAME_TIME=4
YR_MON=2021-08 VARIABLE_NAME_TIME=5
YR_MON=2021-09 VARIABLE_NAME_TIME=6
&lt;/PRE&gt;</description>
    <pubDate>Sat, 08 Oct 2022 00:16:42 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-10-08T00:16:42Z</dc:date>
    <item>
      <title>How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837470#M331118</link>
      <description>&lt;P&gt;Hi there, I want to create a backbone table using Macro at a starting YYYY-MM that equals (Variable_NAME_TIME) to 1 and then as time moves forward the 'Variable_NAME_TIME' will increase by a increment of 1 until previous month. In this case Sept 2022.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example:&lt;/P&gt;
&lt;P&gt;Yr_mon&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Variable_NAME_TIME&lt;/P&gt;
&lt;P&gt;2021-04&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;2021-05&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;2021-06&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;2021-07&amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;2021-08&amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/P&gt;
&lt;P&gt;2021-09&amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to come up with a macro loop to get YYYY-Mon but not how to get&amp;nbsp;Variable_NAME_TIME.&amp;nbsp; Any suggestions or advice would be very appreciated!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*SET MACRO BEGIN DATE;
%let begin_date = '2021-04';
%put &amp;amp;begin_date;
* SET MACRO END DATE IN YYYY-MM;
%let Prev_Month_short = %sysfunc(intnx(month,%sysfunc(date()),-1),YYMMD.);
%put &amp;amp;Prev_Month_short;
* SET MACRO CURRENT DATE IN YYYY-MM;
%let Cur_Month = %sysfunc(today(),YYMMD.);
%put &amp;amp;Cur_Month;

%macro date_loop(start,end);
	%let start=%sysfunc(inputn(&amp;amp;start,anydtdte9.));
		%let end=%sysfunc(inputn(&amp;amp;end,anydtdte9.)); 
   			%let dif=%sysfunc(intck(month,&amp;amp;start,&amp;amp;end));
	%do i=0 %to &amp;amp;dif;
		%let date=%sysfunc(intnx(month,&amp;amp;start,&amp;amp;i,b),YYMMD.); 
      	%put &amp;amp;date;
	%end;
%mend date_loop;
%date_loop(&amp;amp;begin_date , &amp;amp;Prev_Month_short)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 21:46:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837470#M331118</guid>
      <dc:creator>Scooby3g</dc:creator>
      <dc:date>2022-10-07T21:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837471#M331119</link>
      <description>&lt;P&gt;Use your i macro variable as is, or add 1?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;*SET MACRO BEGIN DATE;
%let begin_date = '2021-04';
%put &amp;amp;begin_date;
* SET MACRO END DATE IN YYYY-MM;
%let Prev_Month_short = %sysfunc(intnx(month,%sysfunc(date()),-1),YYMMD.);
%put &amp;amp;Prev_Month_short;
* SET MACRO CURRENT DATE IN YYYY-MM;
%let Cur_Month = %sysfunc(today(),YYMMD.);
%put &amp;amp;Cur_Month;

%macro date_loop(start,end);
	%let start=%sysfunc(inputn(&amp;amp;start,anydtdte9.));
		%let end=%sysfunc(inputn(&amp;amp;end,anydtdte9.)); 
   			%let dif=%sysfunc(intck(month,&amp;amp;start,&amp;amp;end));
	%do i=0 %to &amp;amp;dif;
		%let date=%sysfunc(intnx(month,&amp;amp;start,&amp;amp;i,b),YYMMD.); 
      	%put &amp;amp;date;
&lt;FONT size="4" color="#800080"&gt;&lt;STRONG&gt;      	%put variable_name_time = &amp;amp;i.;
      	%put variable_name_time = %eval(&amp;amp;i.+1);&lt;/STRONG&gt;&lt;/FONT&gt;
	%end;
%mend date_loop;
%date_loop(&amp;amp;begin_date , &amp;amp;Prev_Month_short)&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/359105"&gt;@Scooby3g&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi there, I want to create a backbone table using Macro at a starting YYYY-MM that equals (Variable_NAME_TIME) to 1 and then as time moves forward the 'Variable_NAME_TIME' will increase by a increment of 1 until previous month. In this case Sept 2022.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example:&lt;/P&gt;
&lt;P&gt;Yr_mon&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Variable_NAME_TIME&lt;/P&gt;
&lt;P&gt;2021-04&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;2021-05&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;2021-06&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;2021-07&amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;2021-08&amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/P&gt;
&lt;P&gt;2021-09&amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to come up with a macro loop to get YYYY-Mon but not how to get&amp;nbsp;Variable_NAME_TIME.&amp;nbsp; Any suggestions or advice would be very appreciated!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;*SET MACRO BEGIN DATE;
%let begin_date = '2021-04';
%put &amp;amp;begin_date;
* SET MACRO END DATE IN YYYY-MM;
%let Prev_Month_short = %sysfunc(intnx(month,%sysfunc(date()),-1),YYMMD.);
%put &amp;amp;Prev_Month_short;
* SET MACRO CURRENT DATE IN YYYY-MM;
%let Cur_Month = %sysfunc(today(),YYMMD.);
%put &amp;amp;Cur_Month;

%macro date_loop(start,end);
	%let start=%sysfunc(inputn(&amp;amp;start,anydtdte9.));
		%let end=%sysfunc(inputn(&amp;amp;end,anydtdte9.)); 
   			%let dif=%sysfunc(intck(month,&amp;amp;start,&amp;amp;end));
	%do i=0 %to &amp;amp;dif;
		%let date=%sysfunc(intnx(month,&amp;amp;start,&amp;amp;i,b),YYMMD.); 
      	%put &amp;amp;date;
	%end;
%mend date_loop;
%date_loop(&amp;amp;begin_date , &amp;amp;Prev_Month_short)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 21:54:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837471#M331119</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-10-07T21:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837476#M331122</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/359105"&gt;@Scooby3g&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi there, I want to create a backbone table using Macro at a starting YYYY-MM that equals (Variable_NAME_TIME) to 1 and then as time moves forward the 'Variable_NAME_TIME' will increase by a increment of 1 until previous month. In this case Sept 2022.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Table to me implies a data set. I don't see anything in your code creating a data set and don't see any obvious for use for this.&lt;/P&gt;
&lt;P&gt;If you actually want a data set I &lt;STRONG&gt;strongly recommend&lt;/STRONG&gt; that you actually use a DATE value instead of a string or other value that imitates a date. There are a large number of tools that SAS supplies to deal with dates that will make it easier to use in the long run.&lt;/P&gt;
&lt;P&gt;A data set could be made this way, if I understand your requirement.&lt;/P&gt;
&lt;PRE&gt;%let begin_date = 202104;

data want;
  yr_mon = input("&amp;amp;begin_date.",yymmn6.);
  do until (yr_mon &amp;gt; intnx('month',today(),-1,'B') );
     Variable_NAME_TIME+1;
     output;
     yr_mon= intnx('month',yr_mon,1,'B');
  end;
  format yr_mon  yymmd7.;
run;

&lt;/PRE&gt;
&lt;P&gt;Your code actually shows a reason not to use values like YYYY-MM as you are using INPUT repeatedly to get a date value. Do it once.&lt;/P&gt;
&lt;P&gt;Typically formatting macro variable values holding dates makes any use of the result more complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also I don't see a use for that macro, unless this expected to be just a part of something else as none of the values you use/create are available outside of that macro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Oct 2022 22:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837476#M331122</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-10-07T22:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837479#M331124</link>
      <description>&lt;P&gt;I am not sure what you are asking for.&amp;nbsp; You already have a counter variable, you named in I for some reason.&amp;nbsp; Just rename it to the new name.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro date_loop(start,end);
%let start=%sysfunc(inputn(&amp;amp;start,anydtdte9.));
%let end=%sysfunc(inputn(&amp;amp;end,anydtdte9.)); 
%do variable_name_time=1 %to %sysfunc(intck(month,&amp;amp;start,&amp;amp;end))+1;
  %let yr_mon=%sysfunc(intnx(month,&amp;amp;start,&amp;amp;variable_name_time-1,b),YYMMD7.); 
  %put &amp;amp;=yr_mon &amp;amp;=variable_name_time;
%end;
%mend date_loop;
%date_loop(01APR2021,01SEP2021);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;119  %date_loop(01APR2021,01SEP2021);
YR_MON=2021-04 VARIABLE_NAME_TIME=1
YR_MON=2021-05 VARIABLE_NAME_TIME=2
YR_MON=2021-06 VARIABLE_NAME_TIME=3
YR_MON=2021-07 VARIABLE_NAME_TIME=4
YR_MON=2021-08 VARIABLE_NAME_TIME=5
YR_MON=2021-09 VARIABLE_NAME_TIME=6
&lt;/PRE&gt;</description>
      <pubDate>Sat, 08 Oct 2022 00:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837479#M331124</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-08T00:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837481#M331126</link>
      <description>&lt;P&gt;Thanks so much Tom!! This is exactly what I was looking to get as a backbone table! =D&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 00:33:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837481#M331126</guid>
      <dc:creator>Scooby3g</dc:creator>
      <dc:date>2022-10-08T00:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837491#M331133</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/359105"&gt;@Scooby3g&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks so much Tom!! This is exactly what I was looking to get as a backbone table! =D&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What do you mean by "TABLE"?&amp;nbsp; A report like in Tables, Listing and Figures?&amp;nbsp; Or a dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Either way that code did not create any table.&amp;nbsp; It just sequentially set a pair of macro variables.&lt;/P&gt;</description>
      <pubDate>Sat, 08 Oct 2022 02:15:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837491#M331133</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-08T02:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837666#M331228</link>
      <description>&lt;P&gt;I was planning on using it as a backbone to left join another dataset to it, rather than manually adding a month to it as time progress.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could I trouble you with one more question? Is it possible to add a total for each year within this data step? Inserting it below Variable_NAME_TIME = 9 and having it being reflected as Variable_NAME_TIME = 10?&lt;/P&gt;
&lt;P&gt;Yr_mon&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Variable_NAME_TIME&lt;/P&gt;
&lt;P&gt;2021-04&amp;nbsp; &amp;nbsp; &amp;nbsp; 1&lt;/P&gt;
&lt;P&gt;2021-05&amp;nbsp; &amp;nbsp; &amp;nbsp; 2&lt;/P&gt;
&lt;P&gt;2021-06&amp;nbsp; &amp;nbsp; &amp;nbsp; 3&lt;/P&gt;
&lt;P&gt;2021-07&amp;nbsp; &amp;nbsp; &amp;nbsp; 4&lt;/P&gt;
&lt;P&gt;2021-08&amp;nbsp; &amp;nbsp; &amp;nbsp; 5&lt;/P&gt;
&lt;P&gt;2021-09&amp;nbsp; &amp;nbsp; &amp;nbsp; 6&lt;/P&gt;
&lt;P&gt;2021-10&amp;nbsp; &amp;nbsp; &amp;nbsp; 7&lt;/P&gt;
&lt;P&gt;2021-11&amp;nbsp; &amp;nbsp; &amp;nbsp; 8&lt;/P&gt;
&lt;P&gt;2021-12&amp;nbsp; &amp;nbsp; &amp;nbsp; 9&lt;/P&gt;
&lt;P&gt;2021-Total&amp;nbsp; &amp;nbsp;10&lt;/P&gt;
&lt;P&gt;2022-01&amp;nbsp; &amp;nbsp; &amp;nbsp; 11&lt;/P&gt;
&lt;P&gt;2022-02&amp;nbsp; &amp;nbsp; &amp;nbsp; 12&lt;/P&gt;
&lt;P&gt;2022-03&amp;nbsp; &amp;nbsp; &amp;nbsp; 13&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Scooby3g_0-1665410980714.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/76053i2B8148B57C4C7805/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Scooby3g_0-1665410980714.png" alt="Scooby3g_0-1665410980714.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 14:14:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837666#M331228</guid>
      <dc:creator>Scooby3g</dc:creator>
      <dc:date>2022-10-10T14:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837678#M331234</link>
      <description>&lt;P&gt;If you want a DATASET why are you using macro code?&lt;/P&gt;
&lt;P&gt;Just write a data step instead.&amp;nbsp; It is soooooo much easier to work with data in a data step than trying to do it in macro code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*%macro date_loop(start,end); */
%let start=01APR2021;
%let end=01MAR2022;
data want;
  length yr_mon $10 variable_name_time 8;
  start = intnx('month',input("&amp;amp;start",anydtdte20.),0);
  end = intnx('month',input("&amp;amp;end",anydtdte20.),0);
  do offset=0 to intck('month',start,end);
    date=intnx('month',start,offset);
    yr_mon = put(date,yymmd7.);
    variable_name_time+1;
    output;
    if month(date)=12 then do;
      variable_name_time+1;
      yr_mon=catx('-',year(date),'Total');
      output;
    end;
  end;
  format start end date yymmdd10.;
 * keep yr_mon variable_name_time;
run;
/*
%mend;
%date_loop(01APR2021,01MAR2022);
*/
proc print data=want;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;                     variable_
Obs      yr_mon      name_time         start           end    offset          date

  1    2021-04            1       2021-04-01    2022-03-01       0      2021-04-01
  2    2021-05            2       2021-04-01    2022-03-01       1      2021-05-01
  3    2021-06            3       2021-04-01    2022-03-01       2      2021-06-01
  4    2021-07            4       2021-04-01    2022-03-01       3      2021-07-01
  5    2021-08            5       2021-04-01    2022-03-01       4      2021-08-01
  6    2021-09            6       2021-04-01    2022-03-01       5      2021-09-01
  7    2021-10            7       2021-04-01    2022-03-01       6      2021-10-01
  8    2021-11            8       2021-04-01    2022-03-01       7      2021-11-01
  9    2021-12            9       2021-04-01    2022-03-01       8      2021-12-01
 10    2021-Total        10       2021-04-01    2022-03-01       8      2021-12-01
 11    2022-01           11       2021-04-01    2022-03-01       9      2022-01-01
 12    2022-02           12       2021-04-01    2022-03-01      10      2022-02-01
 13    2022-03           13       2021-04-01    2022-03-01      11      2022-03-01
&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Oct 2022 15:20:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837678#M331234</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-10-10T15:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Macro loop of YYYY-MM and a variable increment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837684#M331236</link>
      <description>Thanks for the suggestion Tom!! I'm going to try this method instead!</description>
      <pubDate>Mon, 10 Oct 2022 15:36:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-Macro-loop-of-YYYY-MM-and-a-variable-increment/m-p/837684#M331236</guid>
      <dc:creator>Scooby3g</dc:creator>
      <dc:date>2022-10-10T15:36:33Z</dc:date>
    </item>
  </channel>
</rss>

