I too the data step code with the hash commands and adapted them to my dataset and variable names so it looks like this: data &dsLib..cohort1_04_copy; if _n_=1 then do; set &dsLib..cohort1_03_copy (obs=1); dcl hash h(dataset:'&dsLib..cohort1_03_copy'); h.definekey('Trader1'); h.definedata('tType'); h.definedone(); end; set &dsLib..cohort1_03_copy; rc=h.find(); drop rc; run; However, I'm getting the following error on the log (line 202 is the line that contains "h.definedone();") ERROR: Invalid data set name at line 202 column 9. ERROR: Hash data set load failed at line 202 column 9. ERROR: DATA STEP Component Object failure. Aborted during the EXECUTION phase. I dont really undesrtand how the has command works so I'm having trouble figuring the error out. Your code works, I'm not sure why mine doesnt. My actual dataset contains other variables, could that be the reason? Thank you.
... View more