<?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: filling blanks with duplicate keys in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/filling-blanks-with-duplicate-keys/m-p/214838#M52896</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use retain:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=5564; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=.; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=.; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=.; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=5566; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=key rename=(new_key=key));&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain new_key;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if key ne . then new_key=key;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lag would also work if its a new variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 May 2015 13:22:39 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2015-05-14T13:22:39Z</dc:date>
    <item>
      <title>filling blanks with duplicate keys</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filling-blanks-with-duplicate-keys/m-p/214837#M52895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a simple way of duplicating the key until it reaches the next values so&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;key&lt;/P&gt;&lt;P&gt;5564&lt;/P&gt;&lt;P&gt;blank&lt;/P&gt;&lt;P&gt;blank&lt;/P&gt;&lt;P&gt;blank&lt;/P&gt;&lt;P&gt;5566&lt;/P&gt;&lt;P&gt;becomes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;5564&lt;/P&gt;&lt;P&gt;5564&lt;/P&gt;&lt;P&gt;5564&lt;/P&gt;&lt;P&gt;5566&lt;/P&gt;&lt;P&gt;5566&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached my dataset&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 13:05:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filling-blanks-with-duplicate-keys/m-p/214837#M52895</guid>
      <dc:creator>brophymj</dc:creator>
      <dc:date>2015-05-14T13:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: filling blanks with duplicate keys</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/filling-blanks-with-duplicate-keys/m-p/214838#M52896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use retain:&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=5564; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=.; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=.; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=.; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; key=5566; output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want (drop=key rename=(new_key=key));&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain new_key;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if key ne . then new_key=key;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lag would also work if its a new variable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 May 2015 13:22:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/filling-blanks-with-duplicate-keys/m-p/214838#M52896</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-05-14T13:22:39Z</dc:date>
    </item>
  </channel>
</rss>

