Simple hash lookup


/ Published in: SAS

Simple, basic syntax for SAS lookup


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.