<?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 how to take a list of n variables and assign them to macro variables cvar_1...cvar_n?? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33541#M6560</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at: &lt;A href="http://www.nesug.org/proceedings/nesug08/cc/cc08.pdf"&gt;http://www.nesug.org/proceedings/nesug08/cc/cc08.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that describes what you are looking for&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jul 2011 22:07:42 GMT</pubDate>
    <dc:creator>art297</dc:creator>
    <dc:date>2011-07-18T22:07:42Z</dc:date>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33538#M6557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know how to assign a straight list of macro variables to one macro variable each, but how do you do it so each value in the list is it's own macro variable as such:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;each variable in the list will be of varying lengths and the list will be any number of variables up to N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let macrolist= var1 var2 var3 var4......varN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ultimately I want to get to this point, where cvar1, cvar2, cvar3....cvarN are the variables from the list above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do i=1 %to N;&lt;/P&gt;&lt;P&gt;call symput ('cvar'||(&amp;amp;i), var&amp;amp;i);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 21:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33538#M6557</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-07-18T21:41:55Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33539#M6558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure if I correctly understand what you are asking.&amp;nbsp; You can create a macro variable using proc sql.&amp;nbsp; Thus you could use something like (untested):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql noprint;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select name into : wantlist&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; separated by " "&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; from dictionary.columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; where libname="THELIBYOUWANT" and&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; memname="THEFILEYOUWANT";&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also incorporate a keep statement to limit which variables you want to include.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Art&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 21:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33539#M6558</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-18T21:58:21Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33540#M6559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Art.&amp;nbsp; If I understand you correctly, you are suggesting putting all the macro variables into 1 new macro variable, I'm talking about taking the list and separating each variable from 1.....to N and creating a new macro variable for each individual one, so that if there are 10 vars in the list, then there will be 10 macro variables.&amp;nbsp; I hope that makes sense.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 22:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33540#M6559</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-07-18T22:02:53Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33541#M6560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Take a look at: &lt;A href="http://www.nesug.org/proceedings/nesug08/cc/cc08.pdf"&gt;http://www.nesug.org/proceedings/nesug08/cc/cc08.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that describes what you are looking for&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 22:07:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33541#M6560</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-07-18T22:07:42Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33542#M6561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You seem to be saying that you want to split the list of words in &amp;amp;MACROLIST into separate variables.&amp;nbsp; Do you want just the text string? or the value of the macro variable that has that name?&lt;/P&gt;&lt;P&gt;Lets do both and call the resulting macro variables CVAR... and CVAL.... (for variable and value).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we assume that you know the value of N then you can do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%do i=1 to &amp;amp;n ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %let cvar&amp;amp;i = %scan(&amp;amp;macrolist,&amp;amp;i,%str( ));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; %let cval&amp;amp;i = &amp;amp;&amp;amp;&amp;amp;cvar&amp;amp;i ;&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you do not know the value of N then you will need to increment the counter variable (I in the code above) manually using %let i=%eval(&amp;amp;i + 1) and test for and empty result from the %scan() function call to terminate the loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to be able to reference the new macro variables after the currently running macro finishes you might want to add a %global statement inside the %do loop.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NOTE: CALL SYMPUT is for use in regular SAS. You should be able to manipulate you macro variables with just macro logic and statements.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2011 23:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33542#M6561</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-07-18T23:27:32Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33543#M6562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I'm trying to just capture the text string with each word broken apart from the original list.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried the following code and can't get this to work quite right...&amp;nbsp; Am I doing something wrong?&amp;nbsp; The value of &amp;amp;cvar1 should be "house".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let macrolist = house garage car speaker;&lt;/P&gt;&lt;P&gt;%let n=4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro assign;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %do i=1 %to &amp;amp;n;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %global;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let cvar&amp;amp;i=%scan(&amp;amp;macrolist,1,%str());&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %end;&lt;/P&gt;&lt;P&gt;%mend assign;&lt;/P&gt;&lt;P&gt;%assign;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put cvar1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008080; font-size: 10pt; font-family: Courier New;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; color: #000080; font-family: Courier New;"&gt;&lt;SPAN style="color: #000080; font-size: 10pt; font-family: Courier New;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 05:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33543#M6562</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-07-19T05:48:56Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33544#M6563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; replace the 1 with &amp;amp;i in the %scan&lt;/P&gt;&lt;P&gt; insert a blank within the brackets of %str()&lt;/P&gt;&lt;P&gt;define which var to global, fully like:&lt;/P&gt;&lt;P&gt;%global cvar&amp;amp;i ;&lt;/P&gt;&lt;P&gt;learn to develop macros with &lt;/P&gt;&lt;P&gt;option symbolgen ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 06:54:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33544#M6563</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-07-19T06:54:37Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33545#M6564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Peter, that did the trick.&amp;nbsp; The 1 was an error on my part of typing as I did have the &amp;amp;i in the original.&amp;nbsp; I'm familiar with the symbolgen mprint mlogic as well, thank you.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is I was able to run this not using the %str(' ') inside with the blank quotes and just using the empty single quotes alone ' '.&amp;nbsp; What is the purpose of the %str in this case?&amp;nbsp; I'm not familiar with the %str and thus was curious what it does here.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you all for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 17:13:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33545#M6564</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-07-19T17:13:55Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33546#M6565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The %str( ) is useful to prevent the macro processor from ignoring the space. When you use single quotes or double quotes around characters they actually become part of the string.&lt;/P&gt;&lt;P&gt;This means that %scan(&amp;amp;myvar,&amp;amp;i,%str( )) means something different than %scan(&amp;amp;myvar,&amp;amp;i,' ').&lt;/P&gt;&lt;P&gt;The first only uses blanks as the delimiter when scanning.&amp;nbsp; The second one will use either blanks or single quote characters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 17:38:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33546#M6565</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-07-19T17:38:36Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33547#M6566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks for the response Tom, makes sense.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2011 20:26:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33547#M6566</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-07-19T20:26:13Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33548#M6567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regarding how to do this when N is unknown, I'm not sure how to do it with your recommendations above.&amp;nbsp; I've tried it several ways using a %do %while and %do %until and trying to determine if the value is blank to terminate the loop, but I keep getting errors.&amp;nbsp; Can you show me how I would do this if the N is unknown?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 00:08:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33548#M6567</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-07-20T00:08:07Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33549#M6568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as you are using SAS verison 9 you should be able to use the COUNTW function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let n=%sysfunc(countw(&amp;amp;macrolist));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise you can loop and increment your own counter.&amp;nbsp; You can either test for empty using something like:&lt;/P&gt;&lt;P&gt;%if (&amp;amp;var = ) %then ....&lt;/P&gt;&lt;P&gt;Or test for zero length&lt;/P&gt;&lt;P&gt;%if %length(&amp;amp;var)=0 %then ...&lt;/P&gt;&lt;P&gt;They test slightly different things, but for this problem they are equivalent as you are using blanks for your delimiter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is one way to count. Remember to subtract one because it stops on an empty word.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let n=1 ;&lt;/P&gt;&lt;P&gt;%do %while(%scan(&amp;amp;macrolist),&amp;amp;n) ne ) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let n=%eval(&amp;amp;n + 1);&lt;/P&gt;&lt;P&gt;%end;&lt;/P&gt;&lt;P&gt;%let n=%eval(&amp;amp;n -1 );&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 00:17:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33549#M6568</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2011-07-20T00:17:46Z</dc:date>
    </item>
    <item>
      <title>how to take a list of n variables and assign them to macro variables cvar_1...cvar_n??</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33550#M6569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks again Tom!&amp;nbsp; Excellent solutions for sure!&amp;nbsp; The first one worked perfect just using the countw function which I was unaware of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried the count one as well and that did the trick too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Really appreciate it!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jul 2011 03:03:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-take-a-list-of-n-variables-and-assign-them-to-macro/m-p/33550#M6569</guid>
      <dc:creator>SASguyCO</dc:creator>
      <dc:date>2011-07-20T03:03:48Z</dc:date>
    </item>
  </channel>
</rss>

