<?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 macro variables in log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614839#M179795</link>
    <description>Thank you, but there is no values in log.&lt;BR /&gt;&lt;BR /&gt;Log:&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;22&lt;BR /&gt;23 GOPTIONS ACCESSIBLE;&lt;BR /&gt;24 %put %sysfunc(countw(%BQUOTE(AList1),%str(,)));&lt;BR /&gt;1&lt;BR /&gt;25</description>
    <pubDate>Thu, 02 Jan 2020 18:48:03 GMT</pubDate>
    <dc:creator>Kalai2008</dc:creator>
    <dc:date>2020-01-02T18:48:03Z</dc:date>
    <item>
      <title>How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614830#M179791</link>
      <description>&lt;P&gt;Hello, Need a quick help!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm defining a user-defined variable number of macro variables that I want to use later in my program.&lt;/P&gt;&lt;P&gt;Like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%let Alist1 = '00123','00124','00175'....; (400 variables)&lt;/P&gt;&lt;P&gt;%let Alist2 = '00163','00164','00165'....;(500 variables)&lt;/P&gt;&lt;P&gt;%let Alist3 = '00153','00154','00155'....;(300 variables)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wanted to check the count of ALIST1 in my log using %PUT statement, not the actual values. Since I am not sure how many were there in some of the lists.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried like this,&lt;/P&gt;&lt;P&gt;%PUT = &amp;amp;Alist1 ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%PUT = count( &amp;amp;Alist1) ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need something like this&lt;/P&gt;&lt;P&gt;Alist = 400??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for checking!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 19:06:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614830#M179791</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2020-01-02T19:06:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614832#M179792</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %sysfunc(countw(%BQUOTE(&amp;amp;Alist1),%str(,)));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Jan 2020 18:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614832#M179792</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-01-02T18:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614835#M179793</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/86703"&gt;@Kalai2008&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use the count() function and use it with the %sysfunc() function as you use macro language;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put %sysfunc(countw("&amp;amp;Alist1"));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Jan 2020 18:20:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614835#M179793</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-01-02T18:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614838#M179794</link>
      <description>&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Log Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;22&lt;BR /&gt;23 GOPTIONS ACCESSIBLE;&lt;BR /&gt;24 %put %sysfunc (countw(&amp;amp;AList1));&lt;BR /&gt;ERROR: The function COUNTW referenced by the %SYSFUNC or %QSYSFUNC macro function has too many arguments.&lt;BR /&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 18:45:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614838#M179794</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2020-01-02T18:45:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614839#M179795</link>
      <description>Thank you, but there is no values in log.&lt;BR /&gt;&lt;BR /&gt;Log:&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;22&lt;BR /&gt;23 GOPTIONS ACCESSIBLE;&lt;BR /&gt;24 %put %sysfunc(countw(%BQUOTE(AList1),%str(,)));&lt;BR /&gt;1&lt;BR /&gt;25</description>
      <pubDate>Thu, 02 Jan 2020 18:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614839#M179795</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2020-01-02T18:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614841#M179796</link>
      <description>Hi,&lt;BR /&gt;Have you tried this with the double quotes:&lt;BR /&gt;%put %sysfunc(countw("&amp;amp;Alist1"));</description>
      <pubDate>Thu, 02 Jan 2020 18:50:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614841#M179796</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-01-02T18:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614842#M179797</link>
      <description>Oh thanks, since I saw warning message, i didn't notice the output.&lt;BR /&gt;NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR&lt;BR /&gt;22&lt;BR /&gt;23 GOPTIONS ACCESSIBLE;&lt;BR /&gt;WARNING: The quoted string currently being processed has become more than 262 characters long. You might have unbalanced quotation&lt;BR /&gt;marks.&lt;BR /&gt;24 %put %sysfunc (countw("&amp;amp;AList1"));&lt;BR /&gt;235&lt;BR /&gt;25</description>
      <pubDate>Thu, 02 Jan 2020 18:55:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614842#M179797</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2020-01-02T18:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614843#M179798</link>
      <description>Just a question: is it normal to have a missing quotation mark before 00124 in you macro variable definition ?&lt;BR /&gt;%let Alist1 = '00123',00124','00175'....; (400 variables)</description>
      <pubDate>Thu, 02 Jan 2020 19:00:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614843#M179798</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-01-02T19:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to count macro variables in log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614844#M179799</link>
      <description>I don't have any missing quotation mark in any of the listed variable, I separated each with commas, not sure why i got that warning message,</description>
      <pubDate>Thu, 02 Jan 2020 19:02:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-macro-variables-in-log/m-p/614844#M179799</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2020-01-02T19:02:59Z</dc:date>
    </item>
  </channel>
</rss>

