title: SAS count of distinct variables - Data Step
body: <p>I want to do the same thing in data step without proc sql.
  note:variable1 is a character variable</p>
  
  <pre><code>proc sql;
   select count(distinct(variable1)),variable2,varibale3      
          from tablename group by variable2,variable3;
  quit;
  </code></pre>
  
  <p>TIA</p>