<?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: multiple macro variables through a loop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/multiple-macro-variables-through-a-loop/m-p/187001#M35400</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reeza. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 28 Feb 2015 20:18:13 GMT</pubDate>
    <dc:creator>rajat051984</dc:creator>
    <dc:date>2015-02-28T20:18:13Z</dc:date>
    <item>
      <title>multiple macro variables through a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multiple-macro-variables-through-a-loop/m-p/186999#M35398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create some macro variables for multiple months as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let datep = date();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;data _null_;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;set b (obs=1);&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;prv1mnt = put(intnx('month',&amp;amp;datep.,-1,'beginning'),monyy7.);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;call symput('prv1mntm',prv1mnt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;prev_1_mon_dt =intnx('month',&amp;amp;datep.,-1,'beginning');&lt;/P&gt;&lt;P&gt;prev_1_mon = year(prev_1_mon_dt)*100 + month(prev_1_mon_dt);&lt;/P&gt;&lt;P&gt;call symput('pr1mn',prev_1_mon);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;I need to do the above processing for last 12 months. Can it be done through loop? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Feb 2015 19:35:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multiple-macro-variables-through-a-loop/m-p/186999#M35398</guid>
      <dc:creator>rajat051984</dc:creator>
      <dc:date>2015-02-28T19:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: multiple macro variables through a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multiple-macro-variables-through-a-loop/m-p/187000#M35399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not 100% sure what you're asking, but wouldn't a macro do loop work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do i=1 %to 12;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%let datep = %sysfunc(intnx(month, %sysfunc(date()), -1*&amp;amp;i, b));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;*rest of code;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Feb 2015 19:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multiple-macro-variables-through-a-loop/m-p/187000#M35399</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-02-28T19:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: multiple macro variables through a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/multiple-macro-variables-through-a-loop/m-p/187001#M35400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reeza. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Feb 2015 20:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/multiple-macro-variables-through-a-loop/m-p/187001#M35400</guid>
      <dc:creator>rajat051984</dc:creator>
      <dc:date>2015-02-28T20:18:13Z</dc:date>
    </item>
  </channel>
</rss>

