<?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 Until/ Do While in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127903#M26108</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like your data tells you how many values to read. Use an iterative loop instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i=1 to visit_freq ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input sales @;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output ;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 06 Jul 2013 15:36:57 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2013-07-06T15:36:57Z</dc:date>
    <item>
      <title>Do Until/ Do While</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127902#M26107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi all, i'm writing a script for data step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the raw file is like this:&lt;/P&gt;&lt;P&gt;(dlm=,)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID,visit_freq,sales1,sales2,sales3,sales4&lt;/P&gt;&lt;P&gt;A,3,2,3,&lt;/P&gt;&lt;P&gt;B,4,1,,2,4&lt;/P&gt;&lt;P&gt;C,2,1,2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;output should be like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ID sales&lt;/P&gt;&lt;P&gt;A 2&lt;/P&gt;&lt;P&gt;A 3&lt;/P&gt;&lt;P&gt;A .&lt;/P&gt;&lt;P&gt;B 1&lt;/P&gt;&lt;P&gt;B .&lt;/P&gt;&lt;P&gt;B 2&lt;/P&gt;&lt;P&gt;B 4&lt;/P&gt;&lt;P&gt;C 1&lt;/P&gt;&lt;P&gt;C 2 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have used do while but the output is a bit different:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data sales1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile ' data path' dlm=',' missover;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input ID$ visit_freq @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do until (visit_freq=0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visit_freq=visit_freq-1;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input sales @;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; drop visit;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;finally i got the output is different the expected (problem of observation B)... may anyone help on this????&lt;/P&gt;&lt;P&gt;Thanks in advance!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jul 2013 14:10:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127902#M26107</guid>
      <dc:creator>yuen68</dc:creator>
      <dc:date>2013-07-06T14:10:06Z</dc:date>
    </item>
    <item>
      <title>Re: Do Until/ Do While</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127903#M26108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like your data tells you how many values to read. Use an iterative loop instead.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i=1 to visit_freq ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input sales @;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output ;&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jul 2013 15:36:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127903#M26108</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-06T15:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Do Until/ Do While</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127904#M26109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually it's similar to the do while/ until concept and the result would be like this?&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;ID sales&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;A 2&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;A 3&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;A .&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;B 1&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;B 2 **&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;B . **&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;B 4&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;C 1&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;C 2&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;i cant figure out why the rows with ** are swapped... &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jul 2013 16:29:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127904#M26109</guid>
      <dc:creator>yuen68</dc:creator>
      <dc:date>2013-07-06T16:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Do Until/ Do While</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127905#M26110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need the dsd option so that treats the adjacent delimiters (,,) as meaning a missing value.&amp;nbsp; Otherwise it treats them the same way it would treat multiple spaces in normal list mode input.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data sales1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; infile 'data path' &lt;STRONG&gt;DSD&lt;/STRONG&gt; dlm=',' &lt;STRONG&gt;TRUNCOVER&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; input ID $ visit_freq @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; do until (visit_freq=0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; visit_freq=visit_freq-1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; input sales @;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; output;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; end;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp; drop visit_freq;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jul 2013 16:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127905#M26110</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-07-06T16:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Do Until/ Do While</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127906#M26111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much Tom!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Jul 2013 17:02:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Do-Until-Do-While/m-p/127906#M26111</guid>
      <dc:creator>yuen68</dc:creator>
      <dc:date>2013-07-06T17:02:24Z</dc:date>
    </item>
  </channel>
</rss>

