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
Navigate AI governance with SAS tools for compliance and ethical AI practices. Try SAS Ai Navigator for free for the first six months.
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.
Ready to level-up your skills? Choose your own adventure.