<?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: %GOTO vs CONTINUE in regular DO LOOP in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252884#M48087</link>
    <description>&lt;P&gt;Agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;. Do not use GOTO statement either in Macro or in Data step ,which will mess your code up and make your code hard to read and tend to generate tons of errors. Any of C programmer knew that. Use DO WHILE() / DO UNTILE() instead .&lt;/P&gt;</description>
    <pubDate>Sat, 27 Feb 2016 03:29:29 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2016-02-27T03:29:29Z</dc:date>
    <item>
      <title>%GOTO vs CONTINUE in regular DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252847#M48069</link>
      <description>&lt;P&gt;I have always been confused with the use of GOTO and %GOTO. Does this code simulate the use of CONTINUE in DO LOOP?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro m;
  %do i =1 %to 3;
   %if &amp;amp;i=2 %then %goto x;
    data dat&amp;amp;i;
	  set sashelp.class;
	run;
  %x: %end;
%mend m;
%m&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Feb 2016 21:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252847#M48069</guid>
      <dc:creator>SAS_inquisitive</dc:creator>
      <dc:date>2016-02-26T21:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: %GOTO vs CONTINUE in regular DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252850#M48071</link>
      <description>&lt;P&gt;GOTO in any form complicates programs and makes them more error prone. In almost 20 years of SAS programming I have never used it, neither GOTO nor %GOTO&lt;/P&gt;
&lt;P&gt;In your case a simple change of the condition to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%if &amp;amp;i ne 2 %then %do;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and insertion of a corresponding %end will do the trick. And this works basically everywhere a goto is (mis)used.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2016 22:09:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252850#M48071</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-02-26T22:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: %GOTO vs CONTINUE in regular DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252876#M48082</link>
      <description>&lt;P&gt;You can eliminate the conditional %if statement by using the %by statement which increments the counter by 2 instead of the default 1 like this :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro m;
	%do i = 1 %to 3 %by 2;
		data dat&amp;amp;i;
			set sashelp.class;
		run;
	%end;
%mend m;

%m;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 27 Feb 2016 01:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252876#M48082</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2016-02-27T01:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: %GOTO vs CONTINUE in regular DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252884#M48087</link>
      <description>&lt;P&gt;Agree with &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;. Do not use GOTO statement either in Macro or in Data step ,which will mess your code up and make your code hard to read and tend to generate tons of errors. Any of C programmer knew that. Use DO WHILE() / DO UNTILE() instead .&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 03:29:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252884#M48087</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2016-02-27T03:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: %GOTO vs CONTINUE in regular DO LOOP</title>
      <link>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252924#M48094</link>
      <description>&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;Yes your %GOTO&lt;SPAN class="apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;does simulate the nonexistent&amp;nbsp;%CONTINUE.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;GOTO&lt;SPAN class="apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;is the most basic branching construct. CONTINUE and LEAVE statements are just&lt;SPAN class="apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;GOTO&lt;SPAN class="apple-converted-space"&gt;&amp;nbsp;&lt;/SPAN&gt;in with implied labels.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;Before there was DO in all its forms there was GOTO.&amp;nbsp; All DO forms can be coded with GOTO, at the heart of those structures the much maligned GOTO is toiling away unseen.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin: 0in; margin-bottom: .0001pt; line-height: 15.0pt; orphans: auto; text-align: start; widows: 1; -webkit-text-stroke-width: 0px; word-spacing: 0px;"&gt;&lt;SPAN style="font-size: 10.5pt; font-family: 'Helvetica','sans-serif'; color: #333333;"&gt;GOTO doesn't make programs bad, programmers make programs bad.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Feb 2016 12:38:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/GOTO-vs-CONTINUE-in-regular-DO-LOOP/m-p/252924#M48094</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2016-02-27T12:38:00Z</dc:date>
    </item>
  </channel>
</rss>

