不要解析 %substr() 返回的宏变量文本,开头为 &

Don't resolve to macrovariable text returned by %substr() with & at the begining

我正在尝试引用宏变量的子字符串。代码是:

%let hola=resuelto!;

%macro prueba(param);
    %let amper=&param;
    %let amper2=%nrbquote(%substr(&param,1,3));
    %put &param;
    %put &amper;
    %put &amper2;
%mend;

%prueba(%nrstr(&hola));

在日志中,我得到:

WARNING: Apparent symbolic reference HO not resolved.
&hola
&hola
&ho

问题是我需要按字面意义将值 &ho 分配给 amper2,而无需任何解析尝试,就像我对 amper 所做的那样,这实际上是字符串 [=15] =]...有什么想法吗?

提前致谢!

改变

%nrbquote(%substr(&param,1,3))

%qsubstr(&param,1,3)

应该可以解决问题。