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
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.