Posted By

rambles on 08/16/11


Tagged

hash sas


Versions (?)

Simple hash lookup


 / Published in: SAS
 

Simple, basic syntax for SAS lookup

  1. data results;
  2. if _n_=1 then do;
  3. set lookup_file(keep=id); ** Read in the variable properties;
  4. declare hash look(dataset: "lookup_file");
  5. look.definekey("id");
  6. look.definedata("name");
  7. look.definedone();
  8. end;
  9.  
  10. set big_data;
  11. if look.find()=0 then output;
  12. run;

Report this snippet  

You need to login to post a comment.