<?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 %If &amp;amp;&amp;amp;M&amp;amp;I = 0 %then %GOTO out? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/If-amp-amp-M-amp-I-0-then-GOTO-out/m-p/361333#M274740</link>
    <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone explain the macro statement below?&amp;nbsp;&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%If &amp;amp;&amp;amp;M&amp;amp;I = 0 %then %GOTO out;&lt;/P&gt;&lt;P&gt;statement;&lt;/P&gt;&lt;P&gt;%out: %end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2017 19:09:45 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2017-05-24T19:09:45Z</dc:date>
    <item>
      <title>%If &amp;&amp;M&amp;I = 0 %then %GOTO out?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-amp-amp-M-amp-I-0-then-GOTO-out/m-p/361333#M274740</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone explain the macro statement below?&amp;nbsp;&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%If &amp;amp;&amp;amp;M&amp;amp;I = 0 %then %GOTO out;&lt;/P&gt;&lt;P&gt;statement;&lt;/P&gt;&lt;P&gt;%out: %end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 19:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-amp-amp-M-amp-I-0-then-GOTO-out/m-p/361333#M274740</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-05-24T19:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: %If &amp;&amp;M&amp;I = 0 %then %GOTO out?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-amp-amp-M-amp-I-0-then-GOTO-out/m-p/361348#M274741</link>
      <description>&lt;P&gt;The result depends on the value of the macro variable &amp;amp;i.&amp;nbsp; When &amp;amp;i is 1, the program examines the macro variable &amp;amp;M1 to see if it is zero.&amp;nbsp; When &amp;amp;i is 2, the program examines the macro variable &amp;amp;M2 to see if it is zero.&amp;nbsp; Etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When a zero is found, the program skips over the statement(s) in the middle.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 19:25:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-amp-amp-M-amp-I-0-then-GOTO-out/m-p/361348#M274741</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-05-24T19:25:43Z</dc:date>
    </item>
    <item>
      <title>Re: %If &amp;&amp;M&amp;I = 0 %then %GOTO out?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/If-amp-amp-M-amp-I-0-then-GOTO-out/m-p/361423#M274742</link>
      <description>&lt;P&gt;Run this to help you make sense of the logic.&lt;/P&gt;
&lt;P&gt;Here the value of i=1, so &amp;amp;&amp;amp;m&amp;amp;i becomes &amp;amp;m1, and the value of m1 is 0.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

option symbolgen nomlogic;

%macro test;
  %let i =1;
  %let m1=0;

  %put Print this line;

  %if &amp;amp;&amp;amp;m&amp;amp;i = 0 %then %goto out;

  %put This line is skipped;;

  %out:
 
  %put This is the end;

%mend;

%test&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 23:03:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/If-amp-amp-M-amp-I-0-then-GOTO-out/m-p/361423#M274742</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-05-24T23:03:57Z</dc:date>
    </item>
  </channel>
</rss>

