Help using Base SAS procedures

Help on catx in proc sql update

Reply
Regular Contributor
Posts: 222

Help on catx in proc sql update

Hello everyone.

I have problem when I run :

%let y=abcdefg;

proc sql noprint;

update one set x = catx('|',x,&y)

;

quit;

after U run the code:

:WARNING: Character expression will be truncated when assigned to character column x..

And In the result,the value of x is missing.

Please help.

Thanks!

Super Contributor
Posts: 1,636

Re: Help on catx in proc sql update

Posted in reply to Mike_Davis

try this:

%let y=abcdefg;

data one;

length x $ 20;

input x;

cards;

a

b

;

proc sql ;

update one set x = catx('|',x,"&y");

quit;

proc print data=one;run;

Ask a Question
Discussion stats
  • 1 reply
  • 1013 views
  • 3 likes
  • 2 in conversation