<?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/29964#M5686</link>
    <description>&lt;A href="http://support.sas.com/onlinedoc/913/docMainpage.jsp" target="_blank"&gt;http://support.sas.com/onlinedoc/913/docMainpage.jsp&lt;/A&gt;</description>
    <pubDate>Tue, 15 Dec 2009 13:05:07 GMT</pubDate>
    <dc:creator>Flip</dc:creator>
    <dc:date>2009-12-15T13:05:07Z</dc:date>
    <item>
      <title>do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29961#M5683</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:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29961#M5683</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-14T13:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29962#M5684</link>
      <description>You can use the INTNX function to increment a value as you have shown using parameter arguments telling SAS how to increment.  Though it's unclear what drives the number of output observations you want to generate, I would suggest a DO / END programming paragraph such as:&lt;BR /&gt;
&lt;BR /&gt;
DATA ;&lt;BR /&gt;
FORMAT MY_START_DATE MY_DERIVED_DATE MMDDYYS8. ;&lt;BR /&gt;
MY_START_DATE = TODAY();&lt;BR /&gt;
DO I=1 TO 6;&lt;BR /&gt;
  MY_DERIVED_DATE = INTNX('MONTH',MY_START_DATE,I);&lt;BR /&gt;
  OUTPUT;&lt;BR /&gt;
  PUTLOG _ALL_;&lt;BR /&gt;
END;&lt;BR /&gt;
STOP;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument on this topic:&lt;BR /&gt;
&lt;BR /&gt;
sas dates intnx site:sas.com

Message was edited by: sbb</description>
      <pubDate>Mon, 14 Dec 2009 14:01:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29962#M5684</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-14T14:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29963#M5685</link>
      <description>Dear sbb,&lt;BR /&gt;
&lt;BR /&gt;
        Thanks a lot for your kind information.But this coding does not work  shows error that an invalid argument to INTNX .I could not able to find the site of  INTNX function .Let me know the site. I shall grateful for early reply.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Regards, &lt;BR /&gt;
Leena

Message was edited by: Leena</description>
      <pubDate>Tue, 15 Dec 2009 11:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29963#M5685</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-15T11:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29964#M5686</link>
      <description>&lt;A href="http://support.sas.com/onlinedoc/913/docMainpage.jsp" target="_blank"&gt;http://support.sas.com/onlinedoc/913/docMainpage.jsp&lt;/A&gt;</description>
      <pubDate>Tue, 15 Dec 2009 13:05:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29964#M5686</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-12-15T13:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29965#M5687</link>
      <description>this coding does not  work. It shows invalid argument to INTNX.</description>
      <pubDate>Tue, 15 Dec 2009 14:09:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29965#M5687</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-12-15T14:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29966#M5688</link>
      <description>Until you share "your version" of the code, we cannot comment on any type of error you might be getting.  I typically test sample code before posting a reply.  Suggest you reply with the SAS log output showing your SAS execution -- all of the code, not just a subset.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 15 Dec 2009 14:29:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29966#M5688</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-15T14:29:57Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29967#M5689</link>
      <description>Of course, you should do some desk-checking to verify the SAS NOTE/WARNING/ERROR you are getting first.&lt;BR /&gt;
&lt;BR /&gt;
Scott</description>
      <pubDate>Tue, 15 Dec 2009 14:30:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29967#M5689</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-12-15T14:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: do while</title>
      <link>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29968#M5690</link>
      <description>Leena;&lt;BR /&gt;
&lt;BR /&gt;
That would indicate you are using the date text as a value, not a SAS date.  There are several methods to convert text to SAS dates.&lt;BR /&gt;
The SAS date is a numeric value.</description>
      <pubDate>Tue, 15 Dec 2009 14:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/do-while/m-p/29968#M5690</guid>
      <dc:creator>Flip</dc:creator>
      <dc:date>2009-12-15T14:52:54Z</dc:date>
    </item>
  </channel>
</rss>

