title: I would like to represent the title and gender variables, in my SAS table, as numbers. How do I do this in SAS?
body: <p>I would like to represent the title and gender variables as numbers. What code do I need to add to do this? </p>
  
  <pre><code>DATA test;
  INPUT title$ gender$ name$ age;
  CARDS;
  Mr Male Micheal 20
  Mrs Female Stephanie 25
  Mr Female Linda 30
  Dr Male James 40
  Dr Female Jane 45;
  run;
  </code></pre>
  
  <p>Below is my attempt at the question. However something is wrong because the title and gender variables does not change!</p>
  
  <pre><code>proc format library = Work;
  value $title_ 'Mr' = 1 'Mrs' = 2 'Dr' = 3;
  value $gender_ 'Male' = 1 'Female' = 2;    
  run;
  
  OPTIONS FMTSEARCH = (Work);
  
  data test;
  format $title $title_;
  set test;
  run;
  </code></pre>