Hello,
I am trying to load a dataset into a hash object.
I want to use the 'DUPLICATE' option in the declare statement to replace all the duplicate keys when loading from the dataset.
But it gives me a warning: "Unrecognized or missing argument tag"
all other options in the declare statement like ORDERED work fine.
I am running this program on SAS learning guide 4.1
why is that it is not recognizing the DUPLICATE option?
Here's the code:
OPTIONS formdlim='#';
data a;
input key a b c;
datalines;
1 10 100 9
1 20 200 8
2 20 100 8
3 30 100 9
4 40 100 9
4 20 200 8
;
Data _null_;
If _N_ = 1 then do;
Declare hash H(dataset: 'work.a',duplicate:'replace', ordered:'d');
H.definekey('key');
H.definedata('a','b','c');
H.definedone();
Call missing (key,a,b,c);
end;
rc=H.OUTPUT(dataset:"work.out");
run;
proc print data =work.out;
run;
Any help on this is appreciated.
Thanks,
SAPPER