l***a 发帖数: 12410 | 1 38 %else %if %sysfunc(weekday(%sysfunc(today()))) in (4,6) %then %do;
39 data _null_; call symput('n',4); run;
40 %end;
ERROR: Required operator not found in expression: %sysfunc(weekday(%sysfunc(
today()))) in (4,6)
ERROR: The macro DATES will stop executing. |
l***a 发帖数: 12410 | 2 if I replace "in (4,6)" with ****=4 or ****=6, the macro will run. does
this mean "in" logic is not valid in %if statement?
sysfunc(
【在 l***a 的大作中提到】 : 38 %else %if %sysfunc(weekday(%sysfunc(today()))) in (4,6) %then %do; : 39 data _null_; call symput('n',4); run; : 40 %end; : ERROR: Required operator not found in expression: %sysfunc(weekday(%sysfunc( : today()))) in (4,6) : ERROR: The macro DATES will stop executing.
|
g*******t 发帖数: 124 | 3 %sysfunc出来的是不是char,这样的话,in就不对了。。
sysfunc(
【在 l***a 的大作中提到】 : 38 %else %if %sysfunc(weekday(%sysfunc(today()))) in (4,6) %then %do; : 39 data _null_; call symput('n',4); run; : 40 %end; : ERROR: Required operator not found in expression: %sysfunc(weekday(%sysfunc( : today()))) in (4,6) : ERROR: The macro DATES will stop executing.
|
o****o 发帖数: 8077 | 4 in operator is not supported in macro. someone wrote a counter part
%IN macro for SAS users |
P****D 发帖数: 11146 | 5 Such a macro exists? Thanks. I was very frustrated by the fact that I cannot
use IN in a macro.
【在 o****o 的大作中提到】 : in operator is not supported in macro. someone wrote a counter part : %IN macro for SAS users
|
o****o 发帖数: 8077 | 6 yes, it does
search "IN operator, macro, SAS" in google
cannot
【在 P****D 的大作中提到】 : Such a macro exists? Thanks. I was very frustrated by the fact that I cannot : use IN in a macro.
|