<?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: DO WHILE vs. DO UNTIL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369033#M88039</link>
    <description>&lt;P&gt;PS and use a more descriptive subject line in the future. "Base SAS" in an exclusively SAS-oriented forum is, ahem, not very bright.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jun 2017 07:29:52 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-06-21T07:29:52Z</dc:date>
    <item>
      <title>DO WHILE vs. DO UNTIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369029#M88036</link>
      <description>&lt;P&gt;&amp;nbsp;Differences between DO WHILE and DO UNTIL statements with examples ?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 07:28:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369029#M88036</guid>
      <dc:creator>Sheelapolakonda</dc:creator>
      <dc:date>2017-06-21T07:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: DO WHILE vs. DO UNTIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369031#M88038</link>
      <description>&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#p1awxgleif5wlen1pja0nrn6yi6i.htm" target="_blank"&gt;DO WHILE Statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#p1021qt3a3n8m2n1vh11ggzhu57n.htm" target="_blank"&gt;DO UNTIL Statement&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maxim 1: Read the Documentation&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 07:28:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369031#M88038</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-21T07:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: DO WHILE vs. DO UNTIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369033#M88039</link>
      <description>&lt;P&gt;PS and use a more descriptive subject line in the future. "Base SAS" in an exclusively SAS-oriented forum is, ahem, not very bright.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 07:29:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369033#M88039</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-21T07:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: DO WHILE vs. DO UNTIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369039#M88042</link>
      <description>&lt;P&gt;What is the question here? &amp;nbsp;What you have posted appears to be a demand for examples of some SAS syntax. &amp;nbsp;If you require examples of something specific the manual is fully encompassing, or there are several books out there. &amp;nbsp;If you have a specific question, please formulate a full explanation, provide example test data in the form of a datastep, what you want out etc. &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 07:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369039#M88042</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-21T07:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: DO WHILE vs. DO UNTIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369045#M88045</link>
      <description>&lt;P&gt;Something to remember:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DO WHILE, the loop executes 0 - n times&lt;/P&gt;
&lt;P&gt;DO UNTIL, the loop executes 1 - n times&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 08:14:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369045#M88045</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-06-21T08:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: DO WHILE vs. DO UNTIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369171#M88097</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/34121"&gt;@Sheelapolakonda&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;Differences between DO WHILE and DO UNTIL statements with examples ?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Not a SAS specific question even. These are generic programming concepts.Wikipedia &lt;A href="https://en.wikipedia.org/wiki/Do_while_loop" target="_blank"&gt;https://en.wikipedia.org/wiki/Do_while_loop&lt;/A&gt; &amp;nbsp;has examples in something like 19 different programming languages.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 14:42:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369171#M88097</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-06-21T14:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: DO WHILE vs. DO UNTIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369199#M88110</link>
      <description>&lt;P&gt;Two main differences. &amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The DO WHILE() will test before executing the code in the loop and DO UNTIL() will test after executing the code.&lt;/LI&gt;
&lt;LI&gt;The tests are backwards. DO WHILE() continues when the condition is TRUE and DO UNTIL() continues when the condition is FALSE.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;You use the DO UNTIL () form if you want to insure that the loop always runs at least once.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure if these are good examples for you, but they are things that I use frequently.&lt;/P&gt;
&lt;P&gt;Process a dataset by groups of records needs to use DO UNTIL() so that the SET statement always runs at least once.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;do until (last.id);
   set mydata ;
   by id ;
   ....
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Read all records from a text file needs to test if the file has anymore records to prevent SAS from stopping the data step when&amp;nbsp;the INPUT statement reads past the end of the file.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;infile 'myfile.csv' dsd firstobs=2 truncover end=eof ;
do while (not eof);
   input a b c ;
   ...
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 16:43:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369199#M88110</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-06-21T16:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: DO WHILE vs. DO UNTIL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369274#M88147</link>
      <description>Tom has covered the basics;&lt;BR /&gt;this page has several examples:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.sascommunity.org/wiki/Do_which_loop_until_or_while" target="_blank"&gt;http://www.sascommunity.org/wiki/Do_which_loop_until_or_while&lt;/A&gt;</description>
      <pubDate>Wed, 21 Jun 2017 18:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/DO-WHILE-vs-DO-UNTIL/m-p/369274#M88147</guid>
      <dc:creator>Ron_MacroMaven</dc:creator>
      <dc:date>2017-06-21T18:59:32Z</dc:date>
    </item>
  </channel>
</rss>

