<?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: Using the IN operator not working? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-the-IN-operator-not-working/m-p/788126#M251915</link>
    <description>&lt;P&gt;If you want to use IN as an operator in macro code you need to tell it so.&lt;/P&gt;
&lt;P&gt;Use the MINOPERATOR option and the MINDELIMITER= option to tell SAS that you want to use IN as an operator.&lt;/P&gt;
&lt;P&gt;If you are using this inside a macro definition use the MINOPERATOR and MINDELIMITER= options on the %MACRO statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;165   options minoperator mindelimiter=' ';
166
167   %let country = SE;
168
169   %IF &amp;amp;country. in SE NO USA %THEN %DO;
170     %put &amp;amp;=country in list.;
COUNTRY=SE in list.
171   %END;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 03 Jan 2022 16:16:42 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-01-03T16:16:42Z</dc:date>
    <item>
      <title>Using the IN operator not working?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-the-IN-operator-not-working/m-p/788123#M251914</link>
      <description>&lt;P&gt;I have the following code (not identical but it captures the question):&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let country = SE;

%IF &amp;amp;country. in (SE NO USA) %THEN %DO; 
	data MyTable1; 
	run; 
%END;

%IF &amp;amp;country. = UK %THEN %DO; 
	data MyTable2; 
	run; 
%END;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Running this code yields the error:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ERROR: Required operator not found in expression: SE in (SE NO USA) 
ERROR: Skipping to next %END statement.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Any ideas why this error occurs and how I can solve it?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jan 2022 16:08:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-the-IN-operator-not-working/m-p/788123#M251914</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2022-01-03T16:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using the IN operator not working?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-the-IN-operator-not-working/m-p/788126#M251915</link>
      <description>&lt;P&gt;If you want to use IN as an operator in macro code you need to tell it so.&lt;/P&gt;
&lt;P&gt;Use the MINOPERATOR option and the MINDELIMITER= option to tell SAS that you want to use IN as an operator.&lt;/P&gt;
&lt;P&gt;If you are using this inside a macro definition use the MINOPERATOR and MINDELIMITER= options on the %MACRO statement.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;165   options minoperator mindelimiter=' ';
166
167   %let country = SE;
168
169   %IF &amp;amp;country. in SE NO USA %THEN %DO;
170     %put &amp;amp;=country in list.;
COUNTRY=SE in list.
171   %END;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 03 Jan 2022 16:16:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-the-IN-operator-not-working/m-p/788126#M251915</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-01-03T16:16:42Z</dc:date>
    </item>
  </channel>
</rss>

