Hi
I wanted to make superscripts and subscrpts in the SAS dataset it self.
The data I have:
TESTCD='INCL01'
TEST="How to make (a+b)2 in this test and make subscript a2 for the same"
DATA NEED;
TESTCD ="INCL01"
TEST ="How to make (a+b)39 in this test and make subscript a2 for the same"
I need 39 as superscript and 2 as subscript...
Thanks for your time.
tekst layout - fonts are not part of characterset. By concept you cannot store basic text that way.
When going to do some output/reports you can do the tekst formatting as part of ODS.
As Jaap has mentioned, superscript/subscript and all the fancy stuff is not part of the "data", it is only for display purposes. Now you can have a dataset with the codes within ready for display such as:
data want;
a="^{sub This text} is subscripted, and ^{super This Text} is superscripted"; output;
run;
ods escapechar="^";
ods rtf file="xxx.rtf" style=statistical;
proc report data=want nowd;
run;
ods rtf close;
And in the output file you will see super/sub scripted, but the data will still contain just the line presented in the datastep.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.