BookmarkSubscribeRSS Feed
Jagadishkatam
Amethyst | Level 16

Hi All,

Need a help.

I would like to get the superscrip for b in a footnote in the report. like for example Patients b, this b needs to be displayed in the superscript form using sas code. Any suggestion would be really helpful.

Thanks Jag

Thanks,
Jag
8 REPLIES 8
Jagadishkatam
Amethyst | Level 16

Thank you Anca for your prompt response.

An explanation with an example will be very helpful to me as i a bit confused.

Thanks,

jag

Thanks,
Jag
AncaTilea
Pyrite | Level 9

OK, if you open the second paper you will see a good simple example:

************************************************************;
data test;
length
secnam $15;
input
sortord secnam $ pvalue;
cards;
1 demog 0.8812
2 ae 0.7112
3 disposition 0.8112
4 medicalhistory 0.9112
;

run;

ods listing close;
ods rtf file="Test output.rtf" style=rtfout;
ods escapechar='\';

proc report data = test missing split="$" spacing=0 headline nowd;
column sortord secnam pvalue;
define sortord / order noprint;
define secnam / order flow "Demographics$Variable\{super a}";
define pvalue / display flow "ANOVA$P-Value\{sub p}";
run;


ods rtf close;
ods trace off;
ods listing;

Jagadishkatam
Amethyst | Level 16

Hi Anca,

The above example works in the titles names, like the variable names, i need to display the superscript b with in the columns.

Thanks,

Jag

Thanks,
Jag
AncaTilea
Pyrite | Level 9

using the sample code above, you could add a format that will add the superscript. I am actually confused about waht do you need.

Basically, to add a superscript you define escapechar = '\', then add to the text you want superscript the "\{super b}"

Hmmm...

Can you give an example of the table?

proc format;

   value $ col demog = "demog\{super a}"    ae = "ae\{super b}";

quit;

ods listing close;
ods rtf file="Test output.rtf" style=rtfout;
ods escapechar='\';

proc report data = test missing split="$" spacing=0 headline nowd;
column sortord secnam pvalue;
define sortord / order noprint;
define secnam / order flow "Demographics$Variable\{super a}";
define pvalue / display flow "ANOVA$P-Value\{sub p}";

format secnam $col.;
run;


ods rtf close;
ods trace off;
ods listing;

Jagadishkatam
Amethyst | Level 16

Hi Arca,

you understood it well and what you have mentioned above works well. This is the same i require.

However it works well in the pc sas, however it is not working in sas on java platform.

So i would appreciate if you know any alternative way.

Thanks,

Jag

Thanks,
Jag
AncaTilea
Pyrite | Level 9

Jag,

I do not know the answer to your java platform problem.

Smiley Sad

Sorry, but hopefully someone around the forum will know it.

Best of luck!

Anca.

Jagadishkatam
Amethyst | Level 16

That's fine Arca. you provided a very useful answer earlier.

Thanks,
Jag

sas-innovate-2024.png

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.

 

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
  • 8 replies
  • 1388 views
  • 0 likes
  • 2 in conversation