我想做一个Q01 1099 1
Q01 1099 3
Q01 1099 5
Q01 1099 7
这样的数据集。。然后写的宏是
%macro macro1(usubjid=);
data test8;
qstestcd='Q01';
visit=%eval(1);
usubjid=&usubjid;
%do %until(visit>%eval(7));
visit=%eval(visit+2);
%end;
run;
%mend macro1;
%macro1(usubjid=1099);
然后报错了- -
ERROR: A character operand was found in the %EVAL function or %IF condition where a numeric operand is required. The condition was:
visit+2
ERROR: The macro MACRO1 will stop executing.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, a numeric constant, a datetime constant,
a missing value, INPUT, PUT.
请问是哪里错了- -另外如果usubjid有好几个值的话,能用循环或者宏把这些数据弄到一个数据集里吗