这本来就是CATQ的用法啊,
CATQ Function
Concatenates character or numeric values by using a delimiter to separate items and by adding quotation marks to strings that contain the delimiter.
根据你的描述,应该是用CATS,
CATS Function
Removes leading and trailing blanks, and returns a concatenated character string.
其实,还有CATT和CATX另外两个,
CATT是只管移除掉trailing blanks,然后和CATS用法一致,
CATX和CATQ用法差不多,要用分隔符把各个字符分开,但是他同时也要去掉leading和trailing的空格
data _null_;
a='abc';
b='efg';
a1=' abc ';
b1=' efg ';
c1=cats(a,b);
c2=catq(' ', a,b);
c3=catt(a1,b1);
c4=catx(' ', a1, b1,'C');
c5=catq(' ', a1, b1, 'C');
put c1;
put c2;
put c3;
put c4;
put c5;
run;
应该是这个意思 ,Concatenates character or numeric values by using a delimiter to separate items and by adding quotation marks to strings that contain the delimiter.