title: SAS : how to test if a variable is numeric
body: <p>I'm searching for a simple function to tell me if a given variable of a given dataset is numeric or not.</p>
  
  <p>I would like to use it like this in an if statement in macro language:</p>
  
  <pre><code>%if isNumeric(ds,var) %then %do ...
  </code></pre>
  
  <p>But I can't find any way to achieve this simply. Do you have any idea if this is feasible?  </p>
  
  <p>I know it's probably trivial, but any help would be appreciated! </p>
  
  <p>Thanks!</p>