平时经常使用的宏变量定义方法有三种:
 1. %let xxx=yyy; 
 2. Call Symput('xxx','yyy');
 3. select xxx into: yyy.
 三种定义方式最大的区别是在MACRO函数内定义所生成的宏变量的类型不同:
 Call Symput在宏函数中定义的宏变量可以在函数外调用;而%let和 Select into则不能,因为这2种方法在MACRO函数内生成的是局部宏变量,若要想在MACRO函数外调用,需事先用%global申明变量类型。
 
 %macro test();
 
 data _NULL_;
 call symput('Today',put(today(),date9.));
 run;
Method 2
%let today=%sysfunc(today(),date9.);
Method 3
 data todaydate;
 date=today();
 Proc sql noprint;
 select put(date,date9.) INTO: today
 from todaydate
 ;
 quit;
 %put &today;
 %mend;
 %test;
%put &today;