<?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 Double %Do %until %end Loop in Macro environment not working as expected in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888315#M350980</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to generate a double loop in a macro environment with %Do %until loops, so that I can execute the code dependent on two macro variables. (Larva.sas):&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;%macro Larva ( Eggs = 6&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; ,time_left = 3600&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%if &amp;amp;Eggs. &amp;gt; 0 %then %do;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;data work.hatchery;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%do %until(%eval(&amp;amp;Eggs. &amp;lt; 1));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%do %until(%eval(&amp;amp;time_left. &amp;lt; 1200));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%put NOTE: &amp;amp;Eggs.;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%let time_left = %eval(&amp;amp;time_left. - 1200);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%put NOTE: &amp;amp;time_left.; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Larva +1;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%let Eggs = %eval(&amp;amp;Eggs. - 1);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;/* call symputx("Eggs", %sysevalf(&amp;amp;Eggs. - 1)); */&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call symputx("Larva", Larva);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;%end;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%mend Larva;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%larva()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, the second %do %until does not work as expected. By checking the log, I realized, that the macro variable "time_left" goes under 1200 without the loop stopping (%do %until(%eval(&amp;amp;time_left. &amp;lt; 1200)); %end):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;NOTE: 6&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 2400&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 5&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 1200&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 4&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 0&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 3&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: -1200&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 2&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: -2400&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 1&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: -3600&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;How could I fix this?&lt;/DIV&gt;&lt;DIV class=""&gt;Thank you for your help!&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;PS: My attachment file is being removed:&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;UL&gt;&lt;LI&gt;The attachment's larva (1).sas content type (application/x-sas) does not match its file extension and has been removed.&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Aug 2023 11:20:26 GMT</pubDate>
    <dc:creator>ifb10</dc:creator>
    <dc:date>2023-08-08T11:20:26Z</dc:date>
    <item>
      <title>Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888315#M350980</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to generate a double loop in a macro environment with %Do %until loops, so that I can execute the code dependent on two macro variables. (Larva.sas):&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;%macro Larva ( Eggs = 6&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; ,time_left = 3600&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; );&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%if &amp;amp;Eggs. &amp;gt; 0 %then %do;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;data work.hatchery;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%do %until(%eval(&amp;amp;Eggs. &amp;lt; 1));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%do %until(%eval(&amp;amp;time_left. &amp;lt; 1200));&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%put NOTE: &amp;amp;Eggs.;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%let time_left = %eval(&amp;amp;time_left. - 1200);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%put NOTE: &amp;amp;time_left.; &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Larva +1;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%let Eggs = %eval(&amp;amp;Eggs. - 1);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;/* call symputx("Eggs", %sysevalf(&amp;amp;Eggs. - 1)); */&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;%end;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;call symputx("Larva", Larva);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;run;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;%end;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%mend Larva;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;%larva()&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;However, the second %do %until does not work as expected. By checking the log, I realized, that the macro variable "time_left" goes under 1200 without the loop stopping (%do %until(%eval(&amp;amp;time_left. &amp;lt; 1200)); %end):&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class=""&gt;NOTE: 6&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 2400&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 5&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 1200&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 4&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 0&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 3&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: -1200&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 2&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: -2400&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: 1&lt;/DIV&gt;&lt;DIV class=""&gt;NOTE: -3600&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;How could I fix this?&lt;/DIV&gt;&lt;DIV class=""&gt;Thank you for your help!&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;PS: My attachment file is being removed:&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;UL&gt;&lt;LI&gt;The attachment's larva (1).sas content type (application/x-sas) does not match its file extension and has been removed.&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 11:20:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888315#M350980</guid>
      <dc:creator>ifb10</dc:creator>
      <dc:date>2023-08-08T11:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888320#M350983</link>
      <description>&lt;P&gt;This is equivalent to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hatchery;
larva = &amp;amp;eggs. * int(&amp;amp;time_left. / 1200);
call symputx("larva",larva);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 Aug 2023 12:06:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888320#M350983</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-08T12:06:57Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888322#M350984</link>
      <description>&lt;P&gt;Since you do not reset &amp;amp;time_left to its original value, and use UNTIL, which forces at least one iteration to be done, it looks like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What do you want to achieve? Supply the rule, and show some examples for different values of eggs and time_left.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 12:13:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888322#M350984</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2023-08-08T12:13:37Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888347#M350987</link>
      <description>&lt;P&gt;I do not understand what the DATA step is there for.&amp;nbsp; You seem to be just changing the values of macro variables.&amp;nbsp; If you do need a dataset then what is the macro logic for?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also do not understand are you manually programming the logic to implement iterative DO loops.&lt;/P&gt;
&lt;P&gt;Is this what you are trying to do?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro Larva(eggs,time_left);
%let larva=0;
%let start=&amp;amp;time_left;
%do eggs=&amp;amp;eggs %to 0 %by -1 ; 
  %do time_left=&amp;amp;start %to 0 %by -1200 ;
     %let larva=%eval(&amp;amp;larva+1);
     %put &amp;amp;=larva &amp;amp;=eggs &amp;amp;=time_left ;
  %end;
  %put %str();
%end;
%mend Larva;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Example run:&lt;/P&gt;
&lt;PRE&gt;383  %Larva
384  (Eggs = 6
385  ,time_left = 3600
386  );
LARVA=1 EGGS=6 TIME_LEFT=3600
LARVA=2 EGGS=6 TIME_LEFT=2400
LARVA=3 EGGS=6 TIME_LEFT=1200
LARVA=4 EGGS=6 TIME_LEFT=0

LARVA=5 EGGS=5 TIME_LEFT=3600
LARVA=6 EGGS=5 TIME_LEFT=2400
LARVA=7 EGGS=5 TIME_LEFT=1200
LARVA=8 EGGS=5 TIME_LEFT=0

LARVA=9 EGGS=4 TIME_LEFT=3600
LARVA=10 EGGS=4 TIME_LEFT=2400
LARVA=11 EGGS=4 TIME_LEFT=1200
LARVA=12 EGGS=4 TIME_LEFT=0

LARVA=13 EGGS=3 TIME_LEFT=3600
LARVA=14 EGGS=3 TIME_LEFT=2400
LARVA=15 EGGS=3 TIME_LEFT=1200
LARVA=16 EGGS=3 TIME_LEFT=0

LARVA=17 EGGS=2 TIME_LEFT=3600
LARVA=18 EGGS=2 TIME_LEFT=2400
LARVA=19 EGGS=2 TIME_LEFT=1200
LARVA=20 EGGS=2 TIME_LEFT=0

LARVA=21 EGGS=1 TIME_LEFT=3600
LARVA=22 EGGS=1 TIME_LEFT=2400
LARVA=23 EGGS=1 TIME_LEFT=1200
LARVA=24 EGGS=1 TIME_LEFT=0

LARVA=25 EGGS=0 TIME_LEFT=3600
LARVA=26 EGGS=0 TIME_LEFT=2400
LARVA=27 EGGS=0 TIME_LEFT=1200
LARVA=28 EGGS=0 TIME_LEFT=0

&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 13:19:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888347#M350987</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-08T13:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888383#M350998</link>
      <description>&lt;P&gt;Hi again&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you are right, I do not need the data step for this macro. This was again just to test call symputx. The code should result in the generation of "larva" dependent on both conditions: Eggs should be greater than 0 and will be consumed per larva and Time for the transformation of Egg into Larva is taking 20 min. Hence if I have 6 Eggs but only 1 hour (3600 s) I should obtain 3 Larva with 3 Eggs remaining. I thought this would be a nice example to couple the two conditions using %do %until Loops:&lt;/P&gt;&lt;LI-CODE lang="sas"&gt;%macro Larva ( Eggs = 6
			  ,time_left = 3600
			  ,Larva = 0
			  );

%if &amp;amp;Eggs. &amp;gt; 0 %then %do;

	%do %until((%eval(&amp;amp;Eggs. &amp;lt; 1)) and (%eval(&amp;amp;time_left. &amp;lt; 1200)));
			%let time_left = %eval(&amp;amp;time_left. - 1200);
			%let Larva = %eval(&amp;amp;larva. +1);
			%let Eggs = %eval(&amp;amp;Eggs. - 1);			
			%put &amp;amp;=Larva. &amp;amp;=Eggs. &amp;amp;=time_left.;
	%end;
%end;

%mend Larva;

%larva()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But this results in:&lt;/P&gt;&lt;LI-CODE lang="sas"&gt; LARVA=1 EGGS=5 TIME_LEFT=2400
 LARVA=2 EGGS=4 TIME_LEFT=1200
 LARVA=3 EGGS=3 TIME_LEFT=0
 LARVA=4 EGGS=2 TIME_LEFT=-1200
 LARVA=5 EGGS=1 TIME_LEFT=-2400
 LARVA=6 EGGS=0 TIME_LEFT=-3600&lt;/LI-CODE&gt;&lt;P&gt;Which is not the intent, since the time factor is being ignored. Hence I tried to execute the two loos sequentially but that lead to the same result.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 14:30:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888383#M350998</guid>
      <dc:creator>ifb10</dc:creator>
      <dc:date>2023-08-08T14:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888391#M351000</link>
      <description>&lt;P&gt;First lets explain a couple of programming things.&lt;/P&gt;
&lt;P&gt;The condition in a %IF statement (and other macro logic statements) will already add an implied %EVAL() call.&amp;nbsp; So you can save a lot of typing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You pass the values of the parameters to the macro when you CALL the macro.&amp;nbsp; You only need to add default values in the %MACRO statement if you want to make the macro easier to use by having default values for some parameters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You want %DO %WHILE() not %DO %UNTIL() since you want the possibility of doing nothing.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro Larva(eggs,time_left,larva);
%put START &amp;amp;=larva &amp;amp;=eggs &amp;amp;=time_left;

%do %while(&amp;amp;eggs&amp;gt;0 and &amp;amp;time_left&amp;gt;=1200);
  %let larva=%eval(&amp;amp;larva+1);
  %let eggs=%eval(&amp;amp;eggs-1);
  %let time_left=%eval(&amp;amp;time_left-1200);
  %put &amp;amp;=larva &amp;amp;=eggs &amp;amp;=time_left;
%end;

%put FINISH &amp;amp;=larva &amp;amp;=eggs &amp;amp;=time_left;

%mend Larva;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Let's try it with your scenario:&lt;/P&gt;
&lt;PRE&gt;460  %Larva
461  (Eggs = 6
462  ,time_left = 3600
463  ,Larva = 0
464  );
START LARVA=0 EGGS=6 TIME_LEFT=3600
LARVA=1 EGGS=5 TIME_LEFT=2400
LARVA=2 EGGS=4 TIME_LEFT=1200
LARVA=3 EGGS=3 TIME_LEFT=0
FINISH LARVA=3 EGGS=3 TIME_LEFT=0
&lt;/PRE&gt;
&lt;P&gt;Now if you want the new values of EGGS or LARVA (or TIME_LEFT) to be returned to the caller then you will need make some changes.&amp;nbsp; Since they are the macro parameters they are by definition LOCAL macro variables.&amp;nbsp; So they will disappear when the macro finishes running.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 14:48:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888391#M351000</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-08T14:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888392#M351001</link>
      <description>&lt;P&gt;Looks like you want OR on the %DO %UNTIL, not AND:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%do %until((%eval(&amp;amp;Eggs. &amp;lt; 1)) or (%eval(&amp;amp;time_left. &amp;lt; 1200)));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You want to stop when you are out of eggs or out of time.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 14:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888392#M351001</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2023-08-08T14:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888400#M351003</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;! I did not even think of this option, since in other languages the and operator meant that both conditions have to be fulfilled. But it makes sense here, I do it until one of the conditions is reached. Funny that it works the other way around with while, which also makes sense after thinking about it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 15:02:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888400#M351003</guid>
      <dc:creator>ifb10</dc:creator>
      <dc:date>2023-08-08T15:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888401#M351004</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;! Learned a lot today thanks to you. Especially the implied %EVAL is useful to know.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 15:03:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888401#M351004</guid>
      <dc:creator>ifb10</dc:creator>
      <dc:date>2023-08-08T15:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Double %Do %until %end Loop in Macro environment not working as expected</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888407#M351005</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412126"&gt;@ifb10&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;! I did not even think of this option, since in other languages the and operator meant that both conditions have to be fulfilled. But it makes sense here, I do it until one of the conditions is reached. Funny that it works the other way around with while, which also makes sense after thinking about it.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Look up &lt;A href="https://en.wikipedia.org/wiki/De_Morgan%27s_laws" target="_self"&gt;De Morgan's law&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Aug 2023 15:15:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Double-Do-until-end-Loop-in-Macro-environment-not-working-as/m-p/888407#M351005</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-08T15:15:11Z</dc:date>
    </item>
  </channel>
</rss>

