data test1;
infile cards truncover;
input a b $;
cards;
1 Y
2  
3  
4 Y
5 Y
6  
7 Y
;
run;

data test2;
do a=1 to 10;
output;
end;
run;

data test3(drop=rc);
        if 0 then set test1;
        if _n_=1 then do;
                dcl hash h(dataset:'test1');
                h.definekey('a');
                h.definedata('a', 'b');
                h.definedone();
                call missing(a, b);
        end;

        set test2;
        rc=h.find();
/*        if rc^=0 then call missing(b);*/
run;

如上,会出现如下结果:
a b
1 Y
2  
3  
4 Y
5 Y
6  
7 Y
8 Y
9 Y
10 Y
只有当去掉mark时,才会得到想要的结果:
a b
1 Y
2  
3  
4 Y
5 Y
6  
7 Y
8
9
10
请教问题出在哪,谢谢