BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Anna_h
Calcite | Level 5


I have created superscript "a" using "aa"x.  Also can create supercripts for 2, 3 ...   What code is for superscript "b"?  Where could I find the code?

1 ACCEPTED SOLUTION

Accepted Solutions
esjackso
Quartz | Level 8

Technically the 'aa'x is a special ascii character referred to as a ordinal indicator (Ordinal indicator - Wikipedia, the free encyclopedia) so technically not a superscript a. I dont think the ascii code set has a  superscript "b" look a like. Here is the full code set I usually refer too when looking characters up ASCII Code - The extended ASCII table

I think the escape character method might be the only way to get at what you need. What do you mean your "system system up does not take this approach with ODS escapechar"? Are you on unix or a mainframe?

EJ

View solution in original post

4 REPLIES 4
Mit
Calcite | Level 5 Mit
Calcite | Level 5

Adding Superscripts and Subscripts
Here is an example that adds a superscript and a subscript.
   ods escapechar='^';
   ods listing close;

   options nodate number;
   footnote;

   ods rtf file="inline.rtf";
   proc print data=sashelp.class;
      title 'This value is superscripted^{super 2} ';
      title2 'This value is subscripted^{sub 2} ';
   run;

Ref:  http://support.sas.com/rnd/base/ods/templateFAQ/Template_rtf.html#super

Anna_h
Calcite | Level 5

Our system setup does not take this approach with ODS escapechar.  It does take hex code.  Want to know what hex code is for "b".  Hex code for "a" is  'aa'x.  It works fine.

Thanks,

esjackso
Quartz | Level 8

Technically the 'aa'x is a special ascii character referred to as a ordinal indicator (Ordinal indicator - Wikipedia, the free encyclopedia) so technically not a superscript a. I dont think the ascii code set has a  superscript "b" look a like. Here is the full code set I usually refer too when looking characters up ASCII Code - The extended ASCII table

I think the escape character method might be the only way to get at what you need. What do you mean your "system system up does not take this approach with ODS escapechar"? Are you on unix or a mainframe?

EJ

Anna_h
Calcite | Level 5

Agree.  I can not find superscript "b" in  ASCII Code - The extended ASCII table.

I am at UNIX, SAS 9.1.3. Guess escape character method is thw way to go.

Thanks,

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 10980 views
  • 3 likes
  • 3 in conversation