<?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 Error Question in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-Error-Question/m-p/364150#M86324</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16509"&gt;@KevinC_&lt;/a&gt;: I think the problem is with the IN clause.&lt;/P&gt;&lt;P&gt;First, you must make sure that the remote system recognizes IN - you should either use&lt;/P&gt;&lt;PRE&gt;rsubmit;
options minoperator;
%macro bbb(i);&lt;/PRE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;rsubmit;
%macro bbb(i)/minoperator;&lt;/PRE&gt;&lt;P&gt;The first method makes In valid in all macros in the remote session, the second method makes if valid for that specific macro, only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second, make sure that your WORD_LIST macro variable is not empty, I think that could create a message like the one you got:&lt;/P&gt;&lt;PRE&gt;rsubmit;
options minoperator;
%macro bbb(i);
%if %length(&amp;amp;word_list) %then
  %if wrd&amp;amp;i in(&amp;amp;word_list) %then %do;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that does not work, check up on the&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#p0pbehl7wj5sl4n1ov1ortnehtba.htm" target="_self"&gt;documentation&lt;/A&gt;&amp;nbsp;for the MINOPERATOR option.&lt;/P&gt;</description>
    <pubDate>Sun, 04 Jun 2017 18:41:55 GMT</pubDate>
    <dc:creator>s_lassen</dc:creator>
    <dc:date>2017-06-04T18:41:55Z</dc:date>
    <item>
      <title>Macro Error Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Error-Question/m-p/363578#M86112</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the following errors when executing themacro bbb.&amp;nbsp; the errors come from the line colored in red.&amp;nbsp; Any suggestions would be greatly appreciated.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thank you in advance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ERROR: Required operator not found in expression: wrd&amp;amp;i. in (&amp;amp;word_list.)&lt;/P&gt;
&lt;P&gt;ERROR: The macro BBB will stop executing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rsubmit&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; bbb(i);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#ff0000"&gt;&lt;FONT face="Courier New" size="2"&gt;%if&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; wrd&amp;amp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; in (&amp;amp;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;word_list.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;) &lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;%then&lt;/FONT&gt; &lt;FONT face="Courier New" size="2"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt; var&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;j.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; = wrd&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; j = &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%eval&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;(&amp;amp;j. + 1);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;endrsubmit&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;rsubmit&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; &lt;STRONG&gt;&lt;I&gt;all_rf&lt;/I&gt;&lt;/STRONG&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;data data5;&lt;/P&gt;
&lt;P&gt;set data4;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; j = 1;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%do&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; i = &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt; &lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%to&lt;/FONT&gt; &lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;60&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt; ;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt; %&lt;STRONG&gt;&lt;I&gt;bbb&lt;/I&gt;&lt;/STRONG&gt;(&amp;amp;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;i.&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%end&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;%&lt;STRONG&gt;&lt;I&gt;all_rf&lt;/I&gt;&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;endrsubmit&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 19:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Error-Question/m-p/363578#M86112</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2017-06-01T19:41:55Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Error Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Error-Question/m-p/363587#M86115</link>
      <description>&lt;P&gt;And with RSUBMIT involved you may be missing a whole bunch of stuff that will impact the operation you are attempting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is your current definition of the macro varialble &amp;amp;word_list?&lt;/P&gt;
&lt;P&gt;Are the "words" separated by the proper delimiter set by the MINDELIMITER system option?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You also do realiazize that the comparison is going to be case sensitive.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;wrd1 will not match WRD1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could also describe what you are attempting to do with this as it appears to be a somewhat convoluted way to do a look up of some flavor. Can you provide a small (not the apparent all 60 values/variables) example of what you are attempting to get with start data and what the final result should look like?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 20:17:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Error-Question/m-p/363587#M86115</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-01T20:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Macro Error Question</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-Error-Question/m-p/364150#M86324</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16509"&gt;@KevinC_&lt;/a&gt;: I think the problem is with the IN clause.&lt;/P&gt;&lt;P&gt;First, you must make sure that the remote system recognizes IN - you should either use&lt;/P&gt;&lt;PRE&gt;rsubmit;
options minoperator;
%macro bbb(i);&lt;/PRE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;rsubmit;
%macro bbb(i)/minoperator;&lt;/PRE&gt;&lt;P&gt;The first method makes In valid in all macros in the remote session, the second method makes if valid for that specific macro, only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Second, make sure that your WORD_LIST macro variable is not empty, I think that could create a message like the one you got:&lt;/P&gt;&lt;PRE&gt;rsubmit;
options minoperator;
%macro bbb(i);
%if %length(&amp;amp;word_list) %then
  %if wrd&amp;amp;i in(&amp;amp;word_list) %then %do;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that does not work, check up on the&amp;nbsp;&lt;A href="http://support.sas.com/documentation/cdl/en/mcrolref/69726/HTML/default/viewer.htm#p0pbehl7wj5sl4n1ov1ortnehtba.htm" target="_self"&gt;documentation&lt;/A&gt;&amp;nbsp;for the MINOPERATOR option.&lt;/P&gt;</description>
      <pubDate>Sun, 04 Jun 2017 18:41:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-Error-Question/m-p/364150#M86324</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2017-06-04T18:41:55Z</dc:date>
    </item>
  </channel>
</rss>

