<?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: How to create a column with first row until the next one occurs(then fill with the new one) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170859#M264238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"when ever it &lt;STRONG style="text-decoration: underline;"&gt;starts&lt;/STRONG&gt; with RAP" makes me thinking, instead of " if find(Header3,'RAP') then Header4=Header3; ", using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if header3 =:'RAP'&amp;nbsp; then Header4=Header3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Nov 2014 21:43:41 GMT</pubDate>
    <dc:creator>Haikuo</dc:creator>
    <dc:date>2014-11-13T21:43:41Z</dc:date>
    <item>
      <title>How to create a column with first row until the next one occurs(then fill with the new one)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170857#M264236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have data in this format....&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 3&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 4&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP12345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP34521&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to create this to this format.(there are more than 300 occurances in a single file or these with more than 1 million rows.)&lt;/P&gt;&lt;P&gt;The header 4 should be filled with data when ever it starts with RAP...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 1&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 2&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 3&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Header 4&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP12345&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP12345&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP12345&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;C&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP12345&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;4&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP34521&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP34521&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;F&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;RAP34521&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;6&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;AA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;D&lt;/TD&gt;&lt;TD&gt;RAP34521&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 21:19:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170857#M264236</guid>
      <dc:creator>rkolupoti9001</dc:creator>
      <dc:date>2014-11-13T21:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a column with first row until the next one occurs(then fill with the new one)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170858#M264237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input Header1 Header2 $ Header3 $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1 AA RAP12345&lt;/P&gt;&lt;P&gt;2 AA D&lt;/P&gt;&lt;P&gt;3 AA C&lt;/P&gt;&lt;P&gt;4 AA RAP34521&lt;/P&gt;&lt;P&gt;5 AA F&lt;/P&gt;&lt;P&gt;6 AA D&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;retain Header4;&lt;/P&gt;&lt;P&gt;if find(Header3,'RAP') then Header4=Header3;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 21:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170858#M264237</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-11-13T21:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a column with first row until the next one occurs(then fill with the new one)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170859#M264238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"when ever it &lt;STRONG style="text-decoration: underline;"&gt;starts&lt;/STRONG&gt; with RAP" makes me thinking, instead of " if find(Header3,'RAP') then Header4=Header3; ", using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if header3 =:'RAP'&amp;nbsp; then Header4=Header3;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 21:43:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170859#M264238</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-11-13T21:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a column with first row until the next one occurs(then fill with the new one)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170860#M264239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;length header4 $ 8 ; /* or whatever length header3 has before the Retain*/&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Nov 2014 21:43:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-column-with-first-row-until-the-next-one-occurs/m-p/170860#M264239</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-11-13T21:43:45Z</dc:date>
    </item>
  </channel>
</rss>

