Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_getvartype.sas File Reference

Returns variable type - Character (C) or Numeric (N) More...

Go to the source code of this file.

Detailed Description

Usage:

  data test;
    length str $1.  num 8.;
    stop;
  run;
  %put %mf_getvartype(test,str);
  %put %mf_getvartype(work.test,num);
Parameters
[in]libdsTwo part dataset (or view) reference.
[in]varthe variable name to be checked
Returns
output returns C or N depending on variable type. If variable does not exist then a blank is returned and a note is written to the log.
Version
9.2
Author
Allan Bowe

Definition in file mf_getvartype.sas.