警告:由%SYSFUNC或%QSYSFUNC宏功能引用的功能PUTC的参数2超出范围

时间:2014-11-18 10:53:27

标签: sas proc-format

我试图将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.

谁能告诉我为什么会这样?

由于

1 个答案:

答案 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;

由于