<?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: Macro for generating combination in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Macro-for-generating-combination/m-p/14005#M2127</link>
    <description>SAS has all the tools you need look a COMB and LEXCOMB functions/call routines.</description>
    <pubDate>Fri, 08 Oct 2010 17:17:36 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2010-10-08T17:17:36Z</dc:date>
    <item>
      <title>Macro for generating combination</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-for-generating-combination/m-p/14004#M2126</link>
      <description>Hi all,&lt;BR /&gt;
&lt;BR /&gt;
I am trying to write a macro function that produces combination of strings within a macro variable &lt;BR /&gt;
&lt;BR /&gt;
For instance when &lt;BR /&gt;
1.Macr_var = a;&lt;BR /&gt;
Then call&lt;BR /&gt;
%calc(a);&lt;BR /&gt;
&lt;BR /&gt;
2.Macr_var = a b;&lt;BR /&gt;
&lt;BR /&gt;
Then call&lt;BR /&gt;
&lt;BR /&gt;
%calc(a b);&lt;BR /&gt;
%calc(a);&lt;BR /&gt;
%calc(b);&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
3. Macr_var = a b c; &lt;BR /&gt;
&lt;BR /&gt;
Then call&lt;BR /&gt;
&lt;BR /&gt;
%calc(a b c);&lt;BR /&gt;
%calc(a);&lt;BR /&gt;
%calc(b);&lt;BR /&gt;
%calc(c);&lt;BR /&gt;
%calc(a b);&lt;BR /&gt;
%calc(a c);&lt;BR /&gt;
%calc(b c);&lt;BR /&gt;
&lt;BR /&gt;
4. Macr_var = a b c d;&lt;BR /&gt;
Then call&lt;BR /&gt;
&lt;BR /&gt;
%calc(a b c d);&lt;BR /&gt;
%calc(a);&lt;BR /&gt;
%calc(b);&lt;BR /&gt;
%calc(c);&lt;BR /&gt;
%calc(d);&lt;BR /&gt;
%calc(a b);&lt;BR /&gt;
%calc(a c);&lt;BR /&gt;
%calc(a d);&lt;BR /&gt;
%calc(b c);&lt;BR /&gt;
%calc(b d);&lt;BR /&gt;
%calc(c d)&lt;BR /&gt;
%calc(a b d);&lt;BR /&gt;
%calc(a c d);&lt;BR /&gt;
%calc(b c d);&lt;BR /&gt;
&lt;BR /&gt;
I was thinking of using do loops but it seems very confusing on how to implement something like this in loops. &lt;BR /&gt;
&lt;BR /&gt;
Would be great if you guys could provide some kind of algorithm that I could use &lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
&lt;BR /&gt;
L</description>
      <pubDate>Fri, 08 Oct 2010 15:51:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-for-generating-combination/m-p/14004#M2126</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-10-08T15:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: Macro for generating combination</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Macro-for-generating-combination/m-p/14005#M2127</link>
      <description>SAS has all the tools you need look a COMB and LEXCOMB functions/call routines.</description>
      <pubDate>Fri, 08 Oct 2010 17:17:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Macro-for-generating-combination/m-p/14005#M2127</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-10-08T17:17:36Z</dc:date>
    </item>
  </channel>
</rss>

