<?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: how to count number of macro variables without executing code in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725742#M225483</link>
    <description>&lt;P&gt;Why the artificial "can't use" restriction?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know how to read a text file? The program is text. Read it into a data set. Then Parse the data for the string "%let" to count the number of times that string is found would find your example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 12 Mar 2021 09:46:07 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-03-12T09:46:07Z</dc:date>
    <item>
      <title>how to count number of macro variables without executing code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725736#M225478</link>
      <description>&lt;P&gt;%let a=10 ;&lt;/P&gt;
&lt;P&gt;%let b=20 ;&lt;/P&gt;
&lt;P&gt;%let c=30 ;&lt;/P&gt;
&lt;P&gt;I am creating 3 macro variables a,b,c so with out executing above code how to do like how many macro&amp;nbsp;&lt;/P&gt;
&lt;P&gt;variables are present in that code (don't use _user_, sashelp.vmacro)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;answer is 3&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 09:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725736#M225478</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2021-03-12T09:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to count number of macro variables without executing code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725741#M225482</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/209685"&gt;@thanikondharish&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;%let a=10 ;&lt;/P&gt;
&lt;P&gt;%let b=20 ;&lt;/P&gt;
&lt;P&gt;%let c=30 ;&lt;/P&gt;
&lt;P&gt;I am creating 3 macro variables a,b,c so with out executing above code how to do like how many macro&amp;nbsp;&lt;/P&gt;
&lt;P&gt;variables are present in that code (don't use _user_, sashelp.vmacro)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;answer is 3&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;you may want to rephrase your post, so that the question you have is clear.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 09:42:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725741#M225482</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-03-12T09:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: how to count number of macro variables without executing code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725742#M225483</link>
      <description>&lt;P&gt;Why the artificial "can't use" restriction?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you know how to read a text file? The program is text. Read it into a data set. Then Parse the data for the string "%let" to count the number of times that string is found would find your example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 09:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725742#M225483</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-03-12T09:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to count number of macro variables without executing code</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725789#M225514</link>
      <description>&lt;P&gt;You will need to set some boundaries on the problem.&amp;nbsp; How complex can the code get?&amp;nbsp; For example, consider:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let start = 10;
%let finish = 15;
%do i=&amp;amp;start %to &amp;amp;finish;
   %let var&amp;amp;i = 0;
%end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Do you want to count that this code has 8 %let statements (2 before the loop, 6 inside the loop)?&amp;nbsp; Do you want to count &amp;amp;i which may be created but not with a %let statement?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 13:55:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-count-number-of-macro-variables-without-executing-code/m-p/725789#M225514</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2021-03-12T13:55:33Z</dc:date>
    </item>
  </channel>
</rss>

