我试图将Proc Format语句的产品用作%sysfunc语句中的格式,如下所示:
proc format;
value myvar
1 = "One" 2 = "Two" 3 = "Three" 4 = "Four";
run;
%let i = 1;
%let dvar = %sysfunc(putc(&i, $myvar.));
%put &dvar;
但是我一直在帖子的标题中收到错误:
WARNING: Argument 2 to function PUTC referenced by the %SYSFUNC or %QSYSFUNC macro function is out of range.
谁能告诉我为什么会这样?
由于
答案 0 :(得分:2)
这最终对我有用:
proc format;
value myvar
1 = "One" 2 = "Two" 3 = "Three" 4 = "Four";
run;
%let i = 1;
%let dvar = %sysfunc(putn(&i, myvar.));
%put &dvar;
由于