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;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 1079 views
  • 4 likes
  • 3 in conversation