<?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: help needed to create a macro var as x1 x2 ...xn where n is not determined in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71367#M15449</link>
    <description>You have tried using a loop?&lt;BR /&gt;
&lt;BR /&gt;
[pre]%let varCount = 10;&lt;BR /&gt;
&lt;BR /&gt;
%do i = 1 %to &amp;amp;varCount;&lt;BR /&gt;
    %local x&amp;amp;i;&lt;BR /&gt;
%end;[/pre]</description>
    <pubDate>Tue, 31 May 2011 11:23:27 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2011-05-31T11:23:27Z</dc:date>
    <item>
      <title>help needed to create a macro var as x1 x2 ...xn where n is not determined</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71366#M15448</link>
      <description>Dear Helper:&lt;BR /&gt;
&lt;BR /&gt;
I am trying to create a macro var as x1 x2 ...xn, where the number n should be determined by another macro var.&lt;BR /&gt;
&lt;BR /&gt;
Sunrain</description>
      <pubDate>Tue, 31 May 2011 11:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71366#M15448</guid>
      <dc:creator>sunrain</dc:creator>
      <dc:date>2011-05-31T11:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: help needed to create a macro var as x1 x2 ...xn where n is not determined</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71367#M15449</link>
      <description>You have tried using a loop?&lt;BR /&gt;
&lt;BR /&gt;
[pre]%let varCount = 10;&lt;BR /&gt;
&lt;BR /&gt;
%do i = 1 %to &amp;amp;varCount;&lt;BR /&gt;
    %local x&amp;amp;i;&lt;BR /&gt;
%end;[/pre]</description>
      <pubDate>Tue, 31 May 2011 11:23:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71367#M15449</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2011-05-31T11:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: help needed to create a macro var as x1 x2 ...xn where n is not determined</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71368#M15450</link>
      <description>Thank you, Andrea.&lt;BR /&gt;
I would like a macro var to contain these variable names, not a list of macro vars.&lt;BR /&gt;
Sorry that I misled you.&lt;BR /&gt;
&lt;BR /&gt;
Sunrain</description>
      <pubDate>Tue, 31 May 2011 11:42:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71368#M15450</guid>
      <dc:creator>sunrain</dc:creator>
      <dc:date>2011-05-31T11:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: help needed to create a macro var as x1 x2 ...xn where n is not determined</title>
      <link>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71369#M15451</link>
      <description>[pre]&lt;BR /&gt;
22   %macro varlist(varCount);&lt;BR /&gt;
23       %do i=1 %to &amp;amp;varCount;&lt;BR /&gt;
24           %*; x&amp;amp;i&lt;BR /&gt;
25       %end;&lt;BR /&gt;
26   %mend;&lt;BR /&gt;
27   %let var=%varlist(10);&lt;BR /&gt;
28   %put var=&amp;amp;var;&lt;BR /&gt;
var=x1 x2 x3 x4 x5 x6 x7 x8 x9 x10&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 31 May 2011 12:08:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/help-needed-to-create-a-macro-var-as-x1-x2-xn-where-n-is-not/m-p/71369#M15451</guid>
      <dc:creator>polingjw</dc:creator>
      <dc:date>2011-05-31T12:08:16Z</dc:date>
    </item>
  </channel>
</rss>

