<?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: Create vector macro varaible in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-vector-macro-varaible/m-p/755255#M238325</link>
    <description>&lt;P&gt;Use a DO loop with INTNX:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
length vector $32767;
start = input("20&amp;amp;minyymm.01",yymmdd10.);
do while (start le input("20&amp;amp;maxyymm.01",yymmdd8.));
  vector=catx("+",vector,substr(put(start,yymmddn8.),3,4));
  start = intnx('month',start,1);
end;
call symputx("vector",vector);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This loop can be used to directly create repeated code with CALL EXECUTE or similar.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Jul 2021 08:26:40 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-07-20T08:26:40Z</dc:date>
    <item>
      <title>Create vector macro varaible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-vector-macro-varaible/m-p/755243#M238317</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;User define 2 macro variables&lt;/P&gt;
&lt;P&gt;%let minYYMM=2007;&lt;/P&gt;
&lt;P&gt;%let maxYYMM=2106;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to create another macro variable called List that will get YYMM&amp;nbsp; values between &amp;amp;minYYMM and &amp;amp;maxYYMM.&lt;/P&gt;
&lt;P&gt;So in this case the desired value of the new macro variable&amp;nbsp; is&amp;nbsp; 2007+2008+2009+2010+2011+2012+2101+2102+2103+2104+2105+2106&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 07:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-vector-macro-varaible/m-p/755243#M238317</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2021-07-20T07:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create vector macro varaible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-vector-macro-varaible/m-p/755255#M238325</link>
      <description>&lt;P&gt;Use a DO loop with INTNX:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
length vector $32767;
start = input("20&amp;amp;minyymm.01",yymmdd10.);
do while (start le input("20&amp;amp;maxyymm.01",yymmdd8.));
  vector=catx("+",vector,substr(put(start,yymmddn8.),3,4));
  start = intnx('month',start,1);
end;
call symputx("vector",vector);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This loop can be used to directly create repeated code with CALL EXECUTE or similar.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Jul 2021 08:26:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-vector-macro-varaible/m-p/755255#M238325</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-07-20T08:26:40Z</dc:date>
    </item>
  </channel>
</rss>

