Hai
Please verify the code
data Task.LSLabel;
length var1 $75.;
var1='FEF25-75% (L/S) (Baseline from P301)';
run;
Actually i need to get the Var1=FEF25-75% (L/S) (Baseline from P301) but now it seems to be FEF25-75% (L/S) (Baseline from P301).
Any way to solve this one
Hi,
This is called super or sub scripting. To get these types of characters you need to "escape" your text. First set the escape character - this is the character in the data which, when followed by { indicates the text is special.
ods escapechar="^";
Now I create some test data, note that the escape char is present, within the curly braces I indicate that I want sub or super script, then place the text, and finish with another curly brace.
data have;
aa="This is a string with a ^{super 25-75%} and a ^{sub 25-75%} in it"; output;
run;
Now I print that dataset to a file to see the results.
ods rtf file="s:\temp\rob\test.rtf";
proc print data=have;
run;
ods rtf close;
Hi,
This is called super or sub scripting. To get these types of characters you need to "escape" your text. First set the escape character - this is the character in the data which, when followed by { indicates the text is special.
ods escapechar="^";
Now I create some test data, note that the escape char is present, within the curly braces I indicate that I want sub or super script, then place the text, and finish with another curly brace.
data have;
aa="This is a string with a ^{super 25-75%} and a ^{sub 25-75%} in it"; output;
run;
Now I print that dataset to a file to see the results.
ods rtf file="s:\temp\rob\test.rtf";
proc print data=have;
run;
ods rtf close;
Thanks RW9
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.