<?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 Macro var value with *, how to handle? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160507#M31243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Courier New;"&gt;I have the following code segment:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 12pt; font-family: Courier New;"&gt;%let alist=a.*;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 12pt; font-family: Courier New;"&gt;%let blist=b.*;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 12pt; font-family: Courier New;"&gt;%if (&amp;amp;alist=a.*) and (&amp;amp;blist=b.*) %then %do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&amp;amp;alist=a.*) and (&amp;amp;blist=b.*) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically it is the * that caused the error. I would like to compare if alist value equal to a.* and blist value equal to b.*, how to achieve this without error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Nov 2014 04:45:49 GMT</pubDate>
    <dc:creator>Macro</dc:creator>
    <dc:date>2014-11-07T04:45:49Z</dc:date>
    <item>
      <title>Macro var value with *, how to handle?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160507#M31243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 12pt; font-family: Courier New;"&gt;I have the following code segment:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 12pt; font-family: Courier New;"&gt;%let alist=a.*;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 12pt; font-family: Courier New;"&gt;%let blist=b.*;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 12pt; font-family: Courier New;"&gt;%if (&amp;amp;alist=a.*) and (&amp;amp;blist=b.*) %then %do;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&amp;amp;alist=a.*) and (&amp;amp;blist=b.*) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically it is the * that caused the error. I would like to compare if alist value equal to a.* and blist value equal to b.*, how to achieve this without error?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2014 04:45:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160507#M31243</guid>
      <dc:creator>Macro</dc:creator>
      <dc:date>2014-11-07T04:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Macro var value with *, how to handle?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160508#M31244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way is using %quote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-family: Courier New; font-size: 12pt;"&gt;%if (%quote(&amp;amp;alist)=a.*) and (%quote(&amp;amp;blist)=b.*) %then %do;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2014 04:58:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160508#M31244</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2014-11-07T04:58:12Z</dc:date>
    </item>
    <item>
      <title>Re: Macro var value with *, how to handle?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160509#M31245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you also need %quote() or %str() around the left side of = sign.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2014 07:51:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160509#M31245</guid>
      <dc:creator>gergely_batho</dc:creator>
      <dc:date>2014-11-07T07:51:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro var value with *, how to handle?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160510#M31246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%macro a;&lt;/P&gt;&lt;P&gt;%let alist=a.*;&lt;BR /&gt;%let blist=b.*;&lt;/P&gt;&lt;P&gt;%if (%bquote(&amp;amp;alist)=%str(a.*)) and (%bquote(&amp;amp;blist)=%str(b.*)) %then %do;&lt;BR /&gt;%put TRUE;&lt;BR /&gt;%end;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%mend a;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%a&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2014 10:00:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-var-value-with-how-to-handle/m-p/160510#M31246</guid>
      <dc:creator>Loko</dc:creator>
      <dc:date>2014-11-07T10:00:39Z</dc:date>
    </item>
  </channel>
</rss>

