How can I remove the space before the "n" in the variable y1.
data x;
y='Provider Name ';
y1=catq('1T',y,'n');
put y= y1=;
run;
Are you trying to make a name literal. There is a function for that.
45 data _null_;
46 y='Provider Name ';
47 y1=catq('1T',y,'n');
48 nl = nliteral(y);
49 put y= y1= nl=;
50 run;
y=Provider Name y1='Provider Name' n nl="Provider Name"N
From the documentation of the CATQ function:
If you do not use the C, D, or H modifiers, CATQ uses a blank as a delimiter.
Are you trying to make a name literal. There is a function for that.
45 data _null_;
46 y='Provider Name ';
47 y1=catq('1T',y,'n');
48 nl = nliteral(y);
49 put y= y1= nl=;
50 run;
y=Provider Name y1='Provider Name' n nl="Provider Name"N
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.