|
Eugenio,
I want to point out that a %LET statement can accomplish the
assignment of a global macro variable. I have also provided a small macro
to do the same. Note, the MDY() function takes numberic variables and
arguments. SAS will automatically do this. Second, to pass a data step
variable value to a macro variable you can use call symput:
6 %macro name (var=,month=,day=,year=);
7 %global &var;
8 data _null_;
9 call symput ("&var", put(%sysfunc(mdy(&month,&day,&year)),5.));
10 run;
11 %mend name;
12
13 %name (var=y,month=6,day=30,year=2001);
NOTE: DATA statement used:
real time 0.01 seconds
cpu time 0.01 seconds
14
15 %put &y;
15156
16
17 %let yy=%sysfunc(mdy(6,30,2001));
18
19 %put &yy;
15156
I hope this helps.
Kevin
Kevin Viel
Georgia Medical Care Foundation
57 Executive Park South, NE
Suite 200
Atlanta, GA 30329-2224
|