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

Hi,

 

is there a way to escape the ODS ESCAPECHAR?

 

We have a validated SAS Macro to create RTF reports which uses "^" as ODS Escapechar and now CDISC has changed the controlled terminology to use "10^6" instead of "10E6". So in our data we have "^" which we must print in the report. It is not possible to change the macro and not possible to omit the value. But we can update the input dataset as long as "^" is printed to the output. Can I somehow escape it? Using ASCII codes or anything?

 

Here a simplyfied example:

 

DATA content;

text = "hallo";OUTPUT;

text = "10^6";OUTPUT;

text = "world";OUTPUT;

RUN;

 

ODS ESCAPECHAR="^";

ODS RTF FILE="escapechar.rtf";

TITLE "Table Example";

PROC REPORT DATA=content;

RUN;

ODS RTF CLOSE;

 

Thanks and best regards,

Katja

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19

Test this...

 

text = "10^^6";OUTPUT;

View solution in original post

3 REPLIES 3
tomrvincent
Rhodochrosite | Level 12
Wouldn't it be easier to translate ^ back to E in the data before doing the proc report?
data_null__
Jade | Level 19

Seems like the validation process for "a validated SAS Macro to create RTF reports which uses "^" as ODS Escapechar"

would have turned-up the need for way to changed the ESCAPECHAR.   Have you look at the parameters of the "validated" macro to see what options you may have in place to solve this problem.

 

data_null__
Jade | Level 19

Test this...

 

text = "10^^6";OUTPUT;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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