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-2024.png

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.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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