<?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: Iteratively concatenate macro variables in a loop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200825#M37520</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first argument to the CATX function should be a character you want to separate the variables&lt;/P&gt;&lt;P&gt;Plus you have a few macro syntax errors, %to instead of 'to' in the do loop, missing an %end for the do loop,&lt;/P&gt;&lt;P&gt;should be %sysfunc not &amp;amp;&amp;nbsp;&amp;nbsp; (hint: % is functions, &amp;amp; is variables) but you want. And in your example the &amp;amp;&amp;amp;&amp;amp;x&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But see if this gives a better idea of where to start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i=1 %to &amp;amp;k;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let str=&amp;amp;str &amp;amp;x;&amp;nbsp;&amp;nbsp; /* yes this tacks on the save value 3 times, but with out test values for whatever may have been intended for &amp;amp;&amp;amp;&amp;amp;X.&amp;amp;i ..., */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;str;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 17:44:35 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2015-08-17T17:44:35Z</dc:date>
    <item>
      <title>Iteratively concatenate macro variables in a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200824#M37519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having some trouble with a seemingly simple problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a series of macro variables, with names Variable1, Variable2, Variable3, etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to create a new macro variable that is a concatenation of all of these individual macro variables. So, let's say we have:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let Variable1 = freq;&lt;/P&gt;&lt;P&gt;%let Variable2 = seq;&lt;/P&gt;&lt;P&gt;%let Variable3 = abc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I want a new variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NewVar = freq seq abc;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I need my code to be generalized, because different times I run this code I will have varying numbers of the individual macro variables. How do I go about doing this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let k=3;&lt;/P&gt;&lt;P&gt;%let x=variable;&lt;/P&gt;&lt;P&gt;%let str=;&lt;/P&gt;&lt;P&gt;%macro test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i=1 %to &amp;amp;k;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let str=%sysfunc(catx(str,&amp;amp;&amp;amp;&amp;amp;x.&amp;amp;i));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put str;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%test;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, this doesn't work. This will just overwrite the "str" macro variable instead of iteratively concatenating it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I go about iteratively concatenating macro variables?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 17:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200824#M37519</guid>
      <dc:creator>RyanSimmons</dc:creator>
      <dc:date>2015-08-17T17:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Iteratively concatenate macro variables in a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200825#M37520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The first argument to the CATX function should be a character you want to separate the variables&lt;/P&gt;&lt;P&gt;Plus you have a few macro syntax errors, %to instead of 'to' in the do loop, missing an %end for the do loop,&lt;/P&gt;&lt;P&gt;should be %sysfunc not &amp;amp;&amp;nbsp;&amp;nbsp; (hint: % is functions, &amp;amp; is variables) but you want. And in your example the &amp;amp;&amp;amp;&amp;amp;x&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But see if this gives a better idea of where to start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i=1 %to &amp;amp;k;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let str=&amp;amp;str &amp;amp;x;&amp;nbsp;&amp;nbsp; /* yes this tacks on the save value 3 times, but with out test values for whatever may have been intended for &amp;amp;&amp;amp;&amp;amp;X.&amp;amp;i ..., */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;str;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 17:44:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200825#M37520</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-17T17:44:35Z</dc:date>
    </item>
    <item>
      <title>Re: Iteratively concatenate macro variables in a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200826#M37521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your code has several s&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;yntax errors, but the general logic is correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Syntax errors:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Missing % in front of TO in %DO loop&lt;/P&gt;&lt;P&gt;2. No %END for %DO loop&lt;/P&gt;&lt;P&gt;3. CATX function is not used properly - first argument is the delimiter&lt;/P&gt;&lt;P&gt;4. CATX function refers to STR instead of &amp;amp;STR to resolve the macro variable&lt;/P&gt;&lt;P&gt;5. It's %sysfunc not &amp;amp;sysfunc&lt;/P&gt;&lt;P&gt;6. To resolve the macro variables to the values you'll need some extra ampersands. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find the correct CAT function that will work for you to provide spaces between the words, otherwise here's a version that partially works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let k=3;&lt;/P&gt;&lt;P&gt;%let x=variable;&lt;/P&gt;&lt;P&gt;%let str=;&lt;/P&gt;&lt;P&gt;%macro test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i=1 %to &amp;amp;k;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let str=%sysfunc(catx(-, &amp;amp;str,&amp;amp;&amp;amp;&amp;amp;x.&amp;amp;i));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;str;&lt;/P&gt;&lt;P&gt;&amp;nbsp; %END;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%test;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 17:48:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200826#M37521</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-08-17T17:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: Iteratively concatenate macro variables in a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200827#M37522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, sorry about those mistakes. I was typing that up in a hurry; I didn't have those mistakes in my actual SAS code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, not sure what you mean by "with out test values for whatever may have been intended for &amp;amp;&amp;amp;&amp;amp;X.&amp;amp;i .", since in my post I did specifically give test values for what I wanted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In any case, this does work. For some reason I didn't realize that you could concatenate macro variables without using an explicit CAT function. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 17:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200827#M37522</guid>
      <dc:creator>RyanSimmons</dc:creator>
      <dc:date>2015-08-17T17:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Iteratively concatenate macro variables in a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200828#M37523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You gave values for one variable X&lt;/P&gt;&lt;P&gt;%let x=variable;&lt;/P&gt;&lt;P&gt;%let i=1;&lt;/P&gt;&lt;P&gt;%put &amp;amp;&amp;amp;&amp;amp;x.&amp;amp;i;&lt;/P&gt;&lt;P&gt;Tries to find the resolved value for &amp;amp;variable1 which you did not provide, an may not have been what you want. You may have meant &amp;amp;&amp;amp;x.&amp;amp;i which resolves to the text Variable1.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:04:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200828#M37523</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-08-17T18:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Iteratively concatenate macro variables in a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200829#M37524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do not need to use CAT() functions to concatenate macro variable values. Just reference the variables next to each other and they are concatenated. (For example: &amp;amp;a.&amp;amp;b)&lt;/P&gt;&lt;P&gt;You showed an example using CATX() which adds a separator, So here is a version in that spirit. If you do not need the separator then do not provide one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; Variable1 = freq;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; Variable2 = seq;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; Variable3 = abc;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; result= ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; &lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%local&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i sep ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%do&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; i=&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%to&lt;/SPAN&gt; &lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; result=&amp;amp;result.&amp;amp;sep.&amp;amp;&amp;amp;variable&amp;amp;i;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%let&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sep=,;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; test;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;%&lt;STRONG&gt;&lt;EM&gt;test&lt;/EM&gt;&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;%put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; result=&amp;amp;result ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;result=freq,seq,abc&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 18:36:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200829#M37524</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-08-17T18:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Iteratively concatenate macro variables in a loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200830#M37525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@ballardw It's in the post:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;I am trying to create a new macro variable that is a concatenation of all of these individual macro variables. So, let's say we have:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%let Variable1 = freq;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%let Variable2 = seq;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;%let Variable3 = abc;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Then I want a new variable:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;NewVar = freq seq abc;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 19:12:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Iteratively-concatenate-macro-variables-in-a-loop/m-p/200830#M37525</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-08-17T19:12:48Z</dc:date>
    </item>
  </channel>
</rss>

