0
2つのテーブルoutput.hicno_xwalk
とpapi_claim_01
の間にハッシュマージを作成しようとしています。以前は、procソートとデータステップを使って通常のマッチマージを行っていました。ここでは、元のコードです:SASのハッシュマージエラー
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;
は今、私はこれを使用しています:
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;
しかし、私はエラーがしようとしている何
ERROR: Type mismatch for method parameter 1 at line 404 column 5. ERROR: Expecting Character type. ERROR: DATA STEP Component Object failure.
Aborted during the EXECUTION phase.
を言って、私のログにエラーが出ます私のコードを修正するにはどうすればいいですか?
ありがとうございました!
:https://communities.sas .com/t5/Base-SAS-プログラミング/ HASH-mistype-error/td-p/161946 – superfluous