leannemcn13

check a macro variable exists

Sep 6th, 2018
286
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. proc sql noprint;
  2. *find age range;
  3.   select name
  4.   into: age
  5.   from sashelp.vcolumn
  6.   where libname = "WORK" and memname= "DM" and name contains "AGE";
  7. quit;
  8.  
  9.  
  10.  
  11. %if %SYMEXIST(&age) %then %do;
  12.   ager = &age;
  13. %end;
RAW Paste Data