我想删除宏中变量的尾随空格,我试过 TRIM、STRIP、%LET,但都不起作用。可以帮我解决吗?
%MACRO DRY(count);
data _NULL_;
inpcount = "&count";
baseref1 = substr(jobid,4,2); ------ value of the jobid is 75412
if inpcount < 10 then do;
baseref = baseref2 || inpcount ;
end;
else do;
baseref = baseref2 || inpcount ;
end;
call symputx('baseref',baseref,'g');
run;
%put baseref: &baseref;
---我得到的值为“SYMBOLGEN:宏变量BASEREF
resolves to 38 1
baseref: 38 01"
预期结果应为 baseref: 3801