<?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: Need to create multiple rows from one based on a start and end date. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510927#M2051</link>
    <description>&lt;P&gt;try the&amp;nbsp;INTGET&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Nov 2018 00:24:57 GMT</pubDate>
    <dc:creator>VDD</dc:creator>
    <dc:date>2018-11-07T00:24:57Z</dc:date>
    <item>
      <title>Need to create multiple rows from one based on a start and end date.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510876#M2042</link>
      <description>&lt;P&gt;Right now I have a list of subscribers to a product. Each subscriber has two fields indicating an effective and term date (named date_eff and date_term), such as 01JUL2003 and 31JAN2004. I would like to create a variable that is Month_Paid for each month in that range, so instead of having one row for that subscriber, I would now have 7 rows with the Month_Paid field being 01JUL2003, 01AUG2003, …, 01DEC2003,&amp;nbsp;01JAN2004.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried a few do loops that I read about on the forum but can't seem to find the correct logic.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 19:45:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510876#M2042</guid>
      <dc:creator>pokerpercal</dc:creator>
      <dc:date>2018-11-06T19:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create multiple rows from one based on a start and end date.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510881#M2044</link>
      <description>Please show what you’ve tried so far. The logic is use INTCK() to determines the number of months and then loop with that. INTNX() will create the dates.</description>
      <pubDate>Tue, 06 Nov 2018 20:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510881#M2044</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-06T20:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create multiple rows from one based on a start and end date.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510882#M2045</link>
      <description>&lt;P&gt;I used the follow code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; want_month;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;set&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; spanMOC;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;date=dateeff;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;do&lt;/FONT&gt; &lt;FONT color="#0000ff" face="Courier New" size="3"&gt;while&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt; (date&amp;lt;=dateterm);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;output&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="3"&gt;date=intnx(&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'month'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;, date, &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="3"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="3"&gt;, &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="3"&gt;'s'&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="3"&gt;end&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="3"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="3"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code will create the 7 rows I am looking for, the problem is that I cant figure out the concise way to create the new column that gives the month and in the format I described in the original post.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 20:08:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510882#M2045</guid>
      <dc:creator>pokerpercal</dc:creator>
      <dc:date>2018-11-06T20:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create multiple rows from one based on a start and end date.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510885#M2046</link>
      <description>Not sure what you mean by ‘I can’t figure out the concise way to create the new column that gives the month and format’?&lt;BR /&gt;&lt;BR /&gt;Doesn’t renaming date to Month_Paid fix that? Otherwise please show a small example of input and desired output.</description>
      <pubDate>Tue, 06 Nov 2018 20:29:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510885#M2046</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-11-06T20:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create multiple rows from one based on a start and end date.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510927#M2051</link>
      <description>&lt;P&gt;try the&amp;nbsp;INTGET&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 00:24:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/510927#M2051</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-11-07T00:24:57Z</dc:date>
    </item>
    <item>
      <title>Re: Need to create multiple rows from one based on a start and end date.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/511021#M2082</link>
      <description>&lt;P&gt;That worked, I had messed up a variable in the loop which was causing the code to run indefinitely. Fixed that and formatted the month field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Nov 2018 14:08:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Need-to-create-multiple-rows-from-one-based-on-a-start-and-end/m-p/511021#M2082</guid>
      <dc:creator>pokerpercal</dc:creator>
      <dc:date>2018-11-07T14:08:08Z</dc:date>
    </item>
  </channel>
</rss>

