创建两个宏变量 &startdate &enddate, 然后用这两个宏变量在macro里做do loop的起点和终点(见下边的代码),但是貌似"01JAN2000"d这种格式不能再macro里用,
%let startdate = 01JAN2000;%let enddate = 01JAN2004;
%macro date;
%do j = "&startdate"d to "&enddate"d;
........;
%end;
%mend;
程序报错:
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric
operand is required. The condition was: "&startdate"d
ERROR: The %FROM value of the %DO J loop is invalid.
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric
operand is required. The condition was: "&enddate"d
ERROR: The %TO value of the %DO J loop is invalid.
ERROR: The macro AVG_INTEREST_COUNTRY will stop executing.
这个怎么破?