<?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: Multiple Hash Objects Code Check in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Multiple-Hash-Objects-Code-Check/m-p/91635#M26116</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! This helped out a lot! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Apr 2012 18:29:25 GMT</pubDate>
    <dc:creator>InfoAlisaA</dc:creator>
    <dc:date>2012-04-23T18:29:25Z</dc:date>
    <item>
      <title>Multiple Hash Objects Code Check</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Multiple-Hash-Objects-Code-Check/m-p/91633#M26114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have a problem where I need to create three separate hash objects and then use them all together in a query in order to pull information.&lt;/P&gt;&lt;P&gt; I am not having&amp;nbsp; problem with getting all of my information from my hash objects except for one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;data billing (keep=Customer_ID Customer_Name Customer_Country Country_Name Product_ID Product_Name Order_Date Quantity Total_Retail_Price);&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Customer_ID 8. Order_Date 8. Product_ID 8. Quantity 8. Total_Retail_Price 8. Product_ID 8. Product_Name $50&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer_Country $5 Customer_Name $50 Country $5 Country_Name $25;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if _N_=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; declare hash P(dataset:'orion.product_list');&lt;/P&gt;&lt;P&gt;&amp;nbsp; P.definekey('Product_ID');&lt;/P&gt;&lt;P&gt;&amp;nbsp; P.definedata('Product_Name');&lt;/P&gt;&lt;P&gt;&amp;nbsp; P.definedone();&lt;/P&gt;&lt;P&gt;&amp;nbsp; declare hash D(dataset:'orion.customer_dim');&lt;/P&gt;&lt;P&gt;&amp;nbsp; D.definekey('Customer_ID');&lt;/P&gt;&lt;P&gt;&amp;nbsp; D.definedata('Customer_Country','Customer_Name');&lt;/P&gt;&lt;P&gt;&amp;nbsp; D.definedone();&lt;/P&gt;&lt;P&gt;&amp;nbsp; declare hash C(dataset:'orion.country');&lt;/P&gt;&lt;P&gt;&amp;nbsp; C.definekey('Country');&lt;/P&gt;&lt;P&gt;&amp;nbsp; C.definedata('Country_Name');&lt;/P&gt;&lt;P&gt;&amp;nbsp; C.definedone();&lt;/P&gt;&lt;P&gt;&amp;nbsp; call missing(Product_ID, Product_Name, Customer_ID, Customer_Country, Customer_Name, Country, Country_Name);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set orderfact;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc1=P.find(key:Product_ID);&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc2=D.find(key:Customer_ID);&lt;/P&gt;&lt;P&gt;&amp;nbsp; rc3=C.find(key:Country);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The hash object that I am having difficulty in returning is the Country_Name.&lt;/P&gt;&lt;P&gt;I am not sure where my code is going wrong, but if someone could take a look at it and let me know where I am going wrong it would be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alisa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Apr 2012 00:16:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Multiple-Hash-Objects-Code-Check/m-p/91633#M26114</guid>
      <dc:creator>InfoAlisaA</dc:creator>
      <dc:date>2012-04-22T00:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Hash Objects Code Check</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Multiple-Hash-Objects-Code-Check/m-p/91634#M26115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alisa,&lt;/P&gt;&lt;P&gt;Not knowing your log message and what exactly being included in 4 of your inputting data set , I am not 100% sure about your problem, but my bet is that 'orderfact' does not have variable 'Country', instead, it has 'Customer_Country'. If that is the case, then it is an easy fix.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data billing (keep=Customer_ID Customer_Name &lt;STRONG style="text-decoration: underline;"&gt;Country&lt;/STRONG&gt; Country_Name Product_ID Product_Name Order_Date Quantity Total_Retail_Price &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;rename=country=Customer_Country&lt;/STRONG&gt;&lt;/SPAN&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Customer_ID 8. Order_Date 8. Product_ID 8. Quantity 8. Total_Retail_Price 8. Product_ID 8. Product_Name $50&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Customer_Country $5 Customer_Name $50 Country $5 Country_Name $25;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if _N_=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; declare hash P(dataset:'orion.product_list');&lt;/P&gt;&lt;P&gt;&amp;nbsp; P.definekey('Product_ID');&lt;/P&gt;&lt;P&gt;&amp;nbsp; P.definedata('Product_Name');&lt;/P&gt;&lt;P&gt;&amp;nbsp; P.definedone();&lt;/P&gt;&lt;P&gt;&amp;nbsp; declare hash D(dataset:'orion.customer_dim');&lt;/P&gt;&lt;P&gt;&amp;nbsp; D.definekey('Customer_ID');&lt;/P&gt;&lt;P&gt;&amp;nbsp; D.definedata('Customer_Country','Customer_Name');&lt;/P&gt;&lt;P&gt;&amp;nbsp; D.definedone();&lt;/P&gt;&lt;P&gt;&amp;nbsp; declare hash C(dataset:'orion.country');&lt;/P&gt;&lt;P&gt;&amp;nbsp; C.definekey('Country');&lt;/P&gt;&lt;P&gt;&amp;nbsp; C.definedata('Country_Name');&lt;/P&gt;&lt;P&gt;&amp;nbsp; C.definedone();&lt;/P&gt;&lt;P&gt;&amp;nbsp; call missing(Product_ID, Product_Name, Customer_ID, Customer_Name, Country, Country_Name);&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set orderfact &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;(rename=Customer_Country=country)&lt;/STRONG&gt;&lt;/SPAN&gt;;&lt;/P&gt;&lt;P&gt; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt; rc1=P.find();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&amp;nbsp; rc2=D.find();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&amp;nbsp; rc3=C.find();&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, key name does not need to be spelled out explicitly in find() method.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck,&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Apr 2012 17:32:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Multiple-Hash-Objects-Code-Check/m-p/91634#M26115</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-04-22T17:32:49Z</dc:date>
    </item>
    <item>
      <title>Re: Multiple Hash Objects Code Check</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Multiple-Hash-Objects-Code-Check/m-p/91635#M26116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! This helped out a lot! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 18:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Multiple-Hash-Objects-Code-Check/m-p/91635#M26116</guid>
      <dc:creator>InfoAlisaA</dc:creator>
      <dc:date>2012-04-23T18:29:25Z</dc:date>
    </item>
  </channel>
</rss>

