<?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 compare String inside Macro?! in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801315#M315358</link>
    <description>&lt;P&gt;You may also want to use the %inm macro, which is the equivalent of the non-macro IN function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro inm(slist,s);
    /* SAS Macro %inm to see if &amp;amp;s is contained in a string or list &amp;amp;slist                 */
    /* Borrowed from https://groups.google.com/forum/#!topic/comp.soft-sys.sas/fWcSDgg11tE */
    %if %sysfunc(indexw(&amp;amp;slist,&amp;amp;s)) gt 0 %then 1 ;
    %else 0;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 10 Mar 2022 13:28:23 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-03-10T13:28:23Z</dc:date>
    <item>
      <title>How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801300#M315347</link>
      <description>&lt;P&gt;Coding a Macro to tell whether one string is in a string list or not[Code and Log are below].&lt;/P&gt;
&lt;P&gt;In one way, it works. But in the other way, it is a BIG NOT. When the String to pass as var with additional space after, the return&amp;nbsp;&lt;/P&gt;
&lt;P&gt;value changes from 1 to 0?!!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyone helps...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let vrf_sellist=vrf_ordval_dif_acs_p vrf_ordval_dif_mix_1 vrf_ordval_dif_mix_2 vrf_ordval_dif_p vrf_ordvol_dif_p vrf_ordvol_dif_p_d vrf_val_dif_p;&lt;/P&gt;
&lt;P&gt;%macro isin(vlist, var);&lt;BR /&gt;%local i isin;&lt;BR /&gt;%let n_vars=%sysfunc(countw(&amp;amp;vlist.));&lt;BR /&gt;%let isin=0;&lt;BR /&gt;%do i=1 %to &amp;amp;n_vars; &lt;BR /&gt;%if &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) %then %do;&lt;BR /&gt;%let isin=1; &lt;BR /&gt;%end;&lt;BR /&gt;%end;&lt;/P&gt;
&lt;P&gt;&amp;amp;isin&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;%isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p); /*=1*/&lt;BR /&gt;%isin(&amp;amp;vrf_sellist., vrf_ordnet_dif_acs_p ); /*=0*/&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;7532 %let vrf_sellist=vrf_ordval_dif_acs_p vrf_ordval_dif_mix_1 vrf_ordval_dif_mix_2&lt;BR /&gt;7532! vrf_ordval_dif_p vrf_ordvol_dif_p vrf_ordvol_dif_p_d vrf_val_dif_p;&lt;BR /&gt;7533&lt;BR /&gt;7534 %macro isin(vlist, var);&lt;BR /&gt;7535 %local i isin;&lt;BR /&gt;7536 %let n_vars=%sysfunc(countw(&amp;amp;vlist.));&lt;BR /&gt;7537 %let isin=0;&lt;BR /&gt;7538 %do i=1 %to &amp;amp;n_vars;&lt;BR /&gt;7539 %if &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) %then %do;&lt;BR /&gt;7540 %let isin=1;&lt;BR /&gt;7541 %end;&lt;BR /&gt;7542 %end;&lt;BR /&gt;7543&lt;BR /&gt;7544 &amp;amp;isin&lt;BR /&gt;7545 %mend;&lt;BR /&gt;7546&lt;BR /&gt;7547&lt;BR /&gt;7548&lt;BR /&gt;7549 %isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p); /*=1*/&lt;BR /&gt;MLOGIC(ISIN): Beginning execution.&lt;BR /&gt;MLOGIC(ISIN): Parameter VLIST has value vrf_ordval_dif_acs_p vrf_ordval_dif_mix_1&lt;BR /&gt;vrf_ordval_dif_mix_2 vrf_ordval_dif_p vrf_ordvol_dif_p vrf_ordvol_dif_p_d&lt;BR /&gt;vrf_val_dif_p&lt;BR /&gt;MLOGIC(ISIN): Parameter VAR has value vrf_ordval_dif_acs_p&lt;BR /&gt;MLOGIC(ISIN): %LOCAL I ISIN&lt;BR /&gt;MLOGIC(ISIN): %LET (variable name is N_VARS)&lt;BR /&gt;MLOGIC(ISIN): %LET (variable name is ISIN)&lt;BR /&gt;MLOGIC(ISIN): %DO loop beginning; index variable I; start value is 1; stop value is 7; by value is&lt;BR /&gt;1.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is TRUE&lt;BR /&gt;MLOGIC(ISIN): %LET (variable name is ISIN)&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 2; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 3; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 4; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 5; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 6; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 7; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 8; loop will not iterate again.&lt;BR /&gt;NOTE: Line generated by the macro variable "ISIN".&lt;BR /&gt;1 1&lt;BR /&gt;-&lt;BR /&gt;180&lt;BR /&gt;MPRINT(ISIN): 1&lt;BR /&gt;MLOGIC(ISIN): Ending execution.&lt;/P&gt;
&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;7550 %isin(&amp;amp;vrf_sellist., vrf_ordnet_dif_acs_p ); /*=0*/&lt;BR /&gt;MLOGIC(ISIN): Beginning execution.&lt;BR /&gt;MLOGIC(ISIN): Parameter VLIST has value vrf_ordval_dif_acs_p vrf_ordval_dif_mix_1&lt;BR /&gt;vrf_ordval_dif_mix_2 vrf_ordval_dif_p vrf_ordvol_dif_p vrf_ordvol_dif_p_d&lt;BR /&gt;vrf_val_dif_p&lt;BR /&gt;MLOGIC(ISIN): Parameter VAR has value vrf_ordnet_dif_acs_p&lt;BR /&gt;MLOGIC(ISIN): %LOCAL I ISIN&lt;BR /&gt;MLOGIC(ISIN): %LET (variable name is N_VARS)&lt;BR /&gt;MLOGIC(ISIN): %LET (variable name is ISIN)&lt;BR /&gt;MLOGIC(ISIN): %DO loop beginning; index variable I; start value is 1; stop value is 7; by value is&lt;BR /&gt;1.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 2; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 3; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 4; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 5; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 6; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 7; loop will iterate again.&lt;BR /&gt;MLOGIC(ISIN): %IF condition &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) is FALSE&lt;BR /&gt;MLOGIC(ISIN): %DO loop index variable I is now 8; loop will not iterate again.&lt;BR /&gt;NOTE: Line generated by the macro variable "ISIN".&lt;BR /&gt;1 0&lt;BR /&gt;-&lt;BR /&gt;180&lt;BR /&gt;MPRINT(ISIN): 0&lt;BR /&gt;MLOGIC(ISIN): Ending execution.&lt;/P&gt;
&lt;P&gt;ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 12:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801300#M315347</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-03-10T12:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801303#M315348</link>
      <description>&lt;P&gt;First, thank you for showing us the &lt;FONT color="#FF0000"&gt;entire&lt;/FONT&gt; LOG for this code. That's helpful. However, it would be 1,000 times better if you include the LOG in the window that appears when you click on the &amp;lt;/&amp;gt; icon. This preserves the formatting of the LOG and makes it much easier to read. Please please please&amp;nbsp;please please&amp;nbsp;please please&amp;nbsp;please please preserve the formatting of the LOG as described every time from now on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2021-11-26 08_27_29-Reply to Message - SAS Support Communities — Mozilla Firefox.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/66123iA4EF494F9CA0F6EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-11-26 08_27_29-Reply to Message - SAS Support Communities — Mozilla Firefox.png" alt="2021-11-26 08_27_29-Reply to Message - SAS Support Communities — Mozilla Firefox.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;It's not clear what your macro is supposed to be doing, or why you have this line in the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;amp;isin&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but that is the error. This line creates SAS code, which SAS then tries to execute. But in SAS code, the number 0 by itself (or the number 1 by itself) is an error. I am thinking you did not intend it to be SAS code, so what is the intent here?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am guessing that you want this macro variable &amp;amp;ISIN to be available to use after the macro runs. Is that correct? If so, remove that one line, remove ISIN from the %LOCAL command, and add this before you actually call the macro:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%global isin;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:01:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801303#M315348</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-10T13:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801308#M315351</link>
      <description>&lt;P&gt;Use it as a logic ... isin is the return value&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%let vrf_sellist=vrf_ordval_dif_acs_p vrf_ordval_dif_mix_1 vrf_ordval_dif_mix_2 vrf_ordval_dif_p vrf_ordvol_dif_p vrf_ordvol_dif_p_d vrf_val_dif_p; %macro isin(vlist, var); %local i isin; %let n_vars=%sysfunc(countw(&amp;amp;vlist.)); %let isin=0; %do i=1 %to &amp;amp;n_vars; %if &amp;amp;var.=%scan(&amp;amp;vlist.,&amp;amp;i) %then %do; %let isin=1; %end; %end; &amp;amp;isin %mend; %isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p); /*=1*/ %isin(&amp;amp;vrf_sellist., vrf_ordnet_dif_acs_p ); /*=0*/ %macro test(); %if %isin(&amp;amp;vrf_sellist., var)=1 %and %isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p)=1 %then %do; %put "both match"; %end; %else %do; %put "has non-match"; %end; %mend; %test();&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801308#M315351</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-03-10T13:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801309#M315352</link>
      <description>&lt;P&gt;The macro itself looks OK, but the way you are calling it is not what it is intended for.&amp;nbsp; Let's assume you remove the semicolon at the end of the macro call, so you have:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This macro call is intended to return a 1 or a 0.&amp;nbsp; So you have to use it in a place where your program would expect to process a 1 or a 0.&amp;nbsp; For example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if %isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p) %then %do;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:09:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801309#M315352</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2022-03-10T13:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801310#M315353</link>
      <description>%macro test();
	%if %isin(&amp;amp;vrf_sellist., var)=1 %and %isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p)=1 %then %do;
		%put "both match";
	%end;
	%else %do;
		%put "has non-match";
	%end;
%mend;

%test();</description>
      <pubDate>Thu, 10 Mar 2022 13:11:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801310#M315353</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-03-10T13:11:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801311#M315354</link>
      <description>&lt;P&gt;Please post code in the code box. Click on the "little running man" icon and paste your code into the box that appears.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:15:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801311#M315354</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-10T13:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801312#M315355</link>
      <description>&lt;P&gt;Know what you say. The quest is when with extra space, the return value changes from 1 to 0.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:17:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801312#M315355</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-03-10T13:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801313#M315356</link>
      <description>&lt;PRE&gt;%let vrf_sellist=vrf_ordval_dif_acs_p	vrf_ordval_dif_mix_1	vrf_ordval_dif_mix_2	vrf_ordval_dif_p	vrf_ordvol_dif_p	vrf_ordvol_dif_p_d	vrf_val_dif_p;

%macro isin(vlist, var);
	%local i isin;
	%let n_vars=%sysfunc(countw(&amp;amp;vlist.));
	%let isin=0;
	%do i=1 %to &amp;amp;n_vars;	
		%if %scan(&amp;amp;var.,1)=%scan(&amp;amp;vlist.,&amp;amp;i) %then %do;
			%let isin=1; 
		%end;

	%end;

	&amp;amp;isin
%mend;

%isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p);  /*=1*/
%isin(&amp;amp;vrf_sellist., vrf_ordnet_dif_acs_p ); /*=0*/


%macro test();
	%if %isin(&amp;amp;vrf_sellist., var)=1 %and %isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p)=1 %then %do;
		%put "both match";
	%end;
	%else %do;
		%put "has non-match";
	%end;
%mend;

%test();
&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801313#M315356</guid>
      <dc:creator>hellohere</dc:creator>
      <dc:date>2022-03-10T13:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801314#M315357</link>
      <description>&lt;P&gt;Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, if you remove these two lines because they are unnecessary&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%isin(&amp;amp;vrf_sellist., vrf_ordval_dif_acs_p);  /*=1*/
%isin(&amp;amp;vrf_sellist., vrf_ordnet_dif_acs_p ); /*=0*/&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and also replace &lt;FONT face="courier new,courier"&gt;%and&lt;/FONT&gt; with &lt;FONT face="courier new,courier"&gt;and&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;everything should work&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:24:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801314#M315357</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-10T13:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to compare String inside Macro?!</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801315#M315358</link>
      <description>&lt;P&gt;You may also want to use the %inm macro, which is the equivalent of the non-macro IN function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro inm(slist,s);
    /* SAS Macro %inm to see if &amp;amp;s is contained in a string or list &amp;amp;slist                 */
    /* Borrowed from https://groups.google.com/forum/#!topic/comp.soft-sys.sas/fWcSDgg11tE */
    %if %sysfunc(indexw(&amp;amp;slist,&amp;amp;s)) gt 0 %then 1 ;
    %else 0;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:28:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-compare-String-inside-Macro/m-p/801315#M315358</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-10T13:28:23Z</dc:date>
    </item>
  </channel>
</rss>

