由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Statistics版 - why this error in %if statement
相关主题
sas 代码问题菜鸟请教关于赋给macro variables变量值
请问SAS ADV 130中74 和80题求助关于sas macro 中的if- then语句
请教SAS adv 题库一道macro题SAS Technical Interview Questions
SAS里用macro的文件名里数字的问题一道sas题 在线求解 50个包子答谢 急啊
问个SAS题目,问一个SAS macro的问题
求教2道sas advance题目,包子答谢。SAS ADV passed!!!
在线等:急问大牛帮我看看SAS macro里的问题请帮忙看3道SAS题。
请教一个SAS Macro的问题[合集] sas advance question
相关话题的讨论汇总
话题: sysfunc话题: error话题: macro话题: statement话题: weekday
进入Statistics版参与讨论
1 (共1页)
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.

1 (共1页)
进入Statistics版参与讨论
相关主题
[合集] sas advance question问个SAS题目,
[合集] 一道SAS Advanced 题目--关于call symput求教2道sas advance题目,包子答谢。
how to create page x of y in SAS在线等:急问大牛帮我看看SAS macro里的问题
SAS help请教一个SAS Macro的问题
sas 代码问题菜鸟请教关于赋给macro variables变量值
请问SAS ADV 130中74 和80题求助关于sas macro 中的if- then语句
请教SAS adv 题库一道macro题SAS Technical Interview Questions
SAS里用macro的文件名里数字的问题一道sas题 在线求解 50个包子答谢 急啊
相关话题的讨论汇总
话题: sysfunc话题: error话题: macro话题: statement话题: weekday