title: Iterate date in loop in SAS
body: <p>need help on one query , I have to iterate date in do loop that is in format of yymmd6.(202112) so that once the month reach to 12 then its automatically change to next year first month.</p>
  <p>///// code////////</p>
  <pre><code>%let startmo=202010 ;
  %let endmo= 202102;
  %macro test;
  %do month= &amp;startmo %to &amp;endmo;
    Data ABC_&amp;month;
    Set test&amp;month;
    X=&amp;month ;
    %end;
    Run; 
  %mend;
  %test;
  </code></pre>
  <p>//////////
  Output should be 5 dataset as</p>
  <pre><code>ABC_202010
  ABC_202011
  ABC_202012
  ABC_202101
  ABC_20210
  </code></pre>
  <p>I need macro variable month to be resolved 202101 once it reached to 202012</p>