<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29847#M5671</link>
    <description>I am not so sure about what actually your question really is. But you may try below code. I hope this one could help.&lt;BR /&gt;
&lt;BR /&gt;
data DosePerDay(drop=start dd);&lt;BR /&gt;
format patientid $3.;&lt;BR /&gt;
format date ddmmyy8.;&lt;BR /&gt;
format dose $4.;&lt;BR /&gt;
start=mdy(3,1,2009);&lt;BR /&gt;
do dd=start to start + 30;&lt;BR /&gt;
patientid="101";&lt;BR /&gt;
date=dd;&lt;BR /&gt;
dose="10mg";&lt;BR /&gt;
output;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=DosePerDay noobs;&lt;BR /&gt;
run;</description>
    <pubDate>Sat, 16 Jan 2010 15:33:41 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-01-16T15:33:41Z</dc:date>
    <item>
      <title>do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29845#M5669</link>
      <description>I have a data like&lt;BR /&gt;
          patientid   date      dose&lt;BR /&gt;
            101       1/03/09  10mg&lt;BR /&gt;
&lt;BR /&gt;
I want a output like this&lt;BR /&gt;
            patientid     date       dose&lt;BR /&gt;
            101          1/03/09    10mg&lt;BR /&gt;
            101          2/03/09    10mg&lt;BR /&gt;
            101          3/03/09    10mg &lt;BR /&gt;
            101          4/03/09    10mg&lt;BR /&gt;
            101         5/03/09     10mg&lt;BR /&gt;
            101        6/03/09      10mg&lt;BR /&gt;
&lt;BR /&gt;
please tell me how to code this program</description>
      <pubDate>Mon, 14 Dec 2009 13:03:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29845#M5669</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-14T13:03:52Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29846#M5670</link>
      <description>One option is a DATA step to read up your variables, then using a DO DT=start_date TO end_date;  / END;  loop you can increment your date value using the INTNX function with the "SAMEDAY" parameter argument and OUTPUT additional observations for some number of INTNX interval periods (another function argument).&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument:&lt;BR /&gt;
&lt;BR /&gt;
data step programming basics site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
...also...&lt;BR /&gt;
&lt;BR /&gt;
using dates intnx site:sas.com</description>
      <pubDate>Tue, 12 Jan 2010 20:02:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29846#M5670</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-01-12T20:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29847#M5671</link>
      <description>I am not so sure about what actually your question really is. But you may try below code. I hope this one could help.&lt;BR /&gt;
&lt;BR /&gt;
data DosePerDay(drop=start dd);&lt;BR /&gt;
format patientid $3.;&lt;BR /&gt;
format date ddmmyy8.;&lt;BR /&gt;
format dose $4.;&lt;BR /&gt;
start=mdy(3,1,2009);&lt;BR /&gt;
do dd=start to start + 30;&lt;BR /&gt;
patientid="101";&lt;BR /&gt;
date=dd;&lt;BR /&gt;
dose="10mg";&lt;BR /&gt;
output;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=DosePerDay noobs;&lt;BR /&gt;
run;</description>
      <pubDate>Sat, 16 Jan 2010 15:33:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29847#M5671</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-01-16T15:33:41Z</dc:date>
    </item>
  </channel>
</rss>

