<?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: modify existing hash object in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/modify-existing-hash-object/m-p/30010#M5701</link>
    <description>The ITERATOR object allows you to control the ordered retrieval of information from the hash table.  Loading the table is much more straightforward.  From your question it sounds like you will want to load the table one record at a time.  The beauty of the hash object is that hash table is independent of the incoming order.&lt;BR /&gt;
&lt;BR /&gt;
There are some references to information at:&lt;BR /&gt;
&lt;A href="http://www.sascommunity.org/wiki/Hash_object_resources" target="_blank"&gt;http://www.sascommunity.org/wiki/Hash_object_resources&lt;/A&gt;</description>
    <pubDate>Fri, 04 Jun 2010 03:22:51 GMT</pubDate>
    <dc:creator>ArtC</dc:creator>
    <dc:date>2010-06-04T03:22:51Z</dc:date>
    <item>
      <title>modify existing hash object</title>
      <link>https://communities.sas.com/t5/SAS-Programming/modify-existing-hash-object/m-p/30009#M5700</link>
      <description>Hi, I am loading a hash table using a sas dataset. I need to modify the code so that only certain records are loaded. Am I correct in thinking that a hash iterator object is the way to go? Thanks in advance for your help.</description>
      <pubDate>Tue, 01 Jun 2010 21:20:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/modify-existing-hash-object/m-p/30009#M5700</guid>
      <dc:creator>frisco</dc:creator>
      <dc:date>2010-06-01T21:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: modify existing hash object</title>
      <link>https://communities.sas.com/t5/SAS-Programming/modify-existing-hash-object/m-p/30010#M5701</link>
      <description>The ITERATOR object allows you to control the ordered retrieval of information from the hash table.  Loading the table is much more straightforward.  From your question it sounds like you will want to load the table one record at a time.  The beauty of the hash object is that hash table is independent of the incoming order.&lt;BR /&gt;
&lt;BR /&gt;
There are some references to information at:&lt;BR /&gt;
&lt;A href="http://www.sascommunity.org/wiki/Hash_object_resources" target="_blank"&gt;http://www.sascommunity.org/wiki/Hash_object_resources&lt;/A&gt;</description>
      <pubDate>Fri, 04 Jun 2010 03:22:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/modify-existing-hash-object/m-p/30010#M5701</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-06-04T03:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: modify existing hash object</title>
      <link>https://communities.sas.com/t5/SAS-Programming/modify-existing-hash-object/m-p/30011#M5702</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
If this is only about subsetting a dataset before you load it into a hash object then why not creating a view and then using this view for loading the hash table, i.e.&lt;BR /&gt;
&lt;BR /&gt;
proc sql;&lt;BR /&gt;
create view HashInput as&lt;BR /&gt;
select &lt;KEY and="" data="https://communities.sas.com/" vars=""&gt;&lt;BR /&gt;
from &lt;TABLE you="" want="" to="" use="" for="" lookup=""&gt;&lt;BR /&gt;
where &lt;SELECTION to="" subset="" data="https://communities.sas.com/"&gt;;&lt;BR /&gt;
quit;&lt;BR /&gt;
&lt;BR /&gt;
data lookup;&lt;BR /&gt;
set ....&lt;BR /&gt;
if _n_ =1 then do;&lt;BR /&gt;
declare hash h1 (dataset:'HashInput'&amp;lt;,...&amp;gt;);&lt;BR /&gt;
....&lt;BR /&gt;
end;&lt;BR /&gt;
....&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If you have to modify the hash table while iterating through the data then look up the add() and delete() methods of the hash object.&lt;BR /&gt;
&lt;BR /&gt;
HTH&lt;BR /&gt;
Patrick&lt;/SELECTION&gt;&lt;/TABLE&gt;&lt;/KEY&gt;</description>
      <pubDate>Sun, 06 Jun 2010 08:02:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/modify-existing-hash-object/m-p/30011#M5702</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2010-06-06T08:02:18Z</dc:date>
    </item>
  </channel>
</rss>

