- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This code used to work in Windows SAS 9.4 - that is, I saw a superscript 1 in both title and data.
But running this in Linux SAS Viya, it doesn't.
The TITLE statement works OK - I see the Superscript 1.
But in the "Age" column, if age < 14, I don't see Superscript 1 - I see a Superscript with a generic-looking degree (zero?) sign.
How can I conditionally add Superscript 1 to end of Age?
Note: I also tried {Unicode '00B9'x} -- but same results.
proc format; picture myPic low -< 14 = "000,009.9(*ESC*){super 1}" other = '000,009.9'; run; title "Title containing a superscript(*ESC*){super 1}"; proc print data=sashelp.class; format age myPic.; run;
Here is the output from Results window. Note Age in Obs 2 has wrong superscript!
Title containing a superscript1
Obs Name Sex Age Height Weight
Alfred | M | 14.0 | 69.0 | 112.5 |
Alice | F | 13.00 | 56.5 | 84.0 |
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @bnawrocki,
A third approach is to type the superscript 1 as ¹ directly into the code, which can be done with Alt+0185 at least under Windows. (Unfortunately I have neither a Linux nor a SAS Viya test environment available.) Interestingly, this is the only approach (among the three suggestions) that works with my Windows SAS 9.4M5 using HTML output:
I don't know why the resulting HTML code differs between title and table and why it contains zeros or degree signs ("°") in the table cells when clearly a "1" or "¹" (='B9'x) was requested. (Also note the ugly vertical alignment when using the first approach.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @bnawrocki,
A third approach is to type the superscript 1 as ¹ directly into the code, which can be done with Alt+0185 at least under Windows. (Unfortunately I have neither a Linux nor a SAS Viya test environment available.) Interestingly, this is the only approach (among the three suggestions) that works with my Windows SAS 9.4M5 using HTML output:
I don't know why the resulting HTML code differs between title and table and why it contains zeros or degree signs ("°") in the table cells when clearly a "1" or "¹" (='B9'x) was requested. (Also note the ugly vertical alignment when using the first approach.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@FreelanceReinh Thanks for checking into this!
Yes, that's what I had to do - I had originally typed Alt-0185 into both strings to get the superscript 1 to display in my Windows SAS reports. But when I copied that SAS code from Windows to Linux and opened the SAS code in SAS Studio there, the 1's had been replaced by a weird "question-mark-in-black-diamond" character. To fix that, in SAS Studio, I typed Alt-0185 over that weird character, and the SAS code now works in Linux SAS.
I'll just have to remember to not copy SAS code between Windows and Linux with these special characters.
I was hoping either the {SUPER} or {UNICODE} trick would work on both Windows and Linux, but no such luck, at least in this case.