title: Hash Merge Error in SAS
body: <p>I am trying to create a hash merge between two tables, <code>output.hicno_xwalk</code>, and <code>papi_claim_01</code>. Before, I had been doing a normal match-merge using proc sorts and a data step. Here is the original code:</p>
  
  <pre><code>proc sort data = output.hicno_xwalk;
  by HICNUMBER Plan_Type;
  run;
  
  proc sort data = papi_claim_01;
  by HICNUMBER Plan_Type;
  run;
  
  data papi_claim_01a;
  merge output.hicno_xwalk (in=a)
    papi_claim_01 (in=b);
  by HICNUMBER Plan_Type;
  if (b);
  run;
  </code></pre>
  
  <p>Now, I am using this: </p>
  
  <pre><code>data hash_merge (drop = rc);
  set output.hicno_xwalk point = _n_;
  if 0 then set output.hicno_xwalk papi_claim_01; *load properties;
  declare hash merge(dataset:'output.hicno_xwalk'); 
  merge.definekey (HIC); *define variable to use as a key (no duplicates);
  merge.definedata ('NEW_HIC','Plan_Type'); *Columns from the merge table to include;
  merge.definedone(); *end hash;
  
  do until (eof);
  set papi_claim_01 end = eof;
  if merge.find() = 0 then output;
  end;
  stop; *output records where HIC is found in both tables;
  
  run;
  </code></pre>
  
  <p>However, I get an error in my log saying</p>
  
  <blockquote>
    <p>ERROR: Type mismatch for method parameter 1 at line 404 column 5.
    ERROR: Expecting Character type. ERROR: DATA STEP Component Object
    failure.</p>
    
    <p>Aborted during the EXECUTION phase.</p>
  </blockquote>
  
  <p>What is the error trying to tell me, and how do I fix my code?</p>
  
  <p>Thanks for the help!</p>