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

Hi All,

I am using    title&t"@R/RTF'\qc %str(%bquote(&&myheader&k))";  to set the content of my title in report.

There is a single quote mark in string &&myheader&k, when I use %put to print this macro variable, the output is fine, single quote mark is there, or if I delete @R/RTF'\qc, the title in output also contains single quote.

but if I use  title&t"@R/RTF'\qc %str(%bquote(&&myheader&k))", the title in output removed the single quote in my original title. I guess it is caused by single quote in @R/RTF'\qc.

can anyone please advise how to resolve this problem?

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
sbxkoenk
SAS Super FREQ

Hello,

Is this solving your problem (%-sign !!);

%LET t=1;
%LET k=2;
%LET myheader2=%nrstr(a%'bc);
title; footnote;
title&t. "@R/RTF'\qc %str(%nrbquote(&&myheader&k))";
proc print data=sashelp.class(obs=5); run;

Koen

View solution in original post

2 REPLIES 2
sbxkoenk
SAS Super FREQ

Hello,

Is this solving your problem (%-sign !!);

%LET t=1;
%LET k=2;
%LET myheader2=%nrstr(a%'bc);
title; footnote;
title&t. "@R/RTF'\qc %str(%nrbquote(&&myheader&k))";
proc print data=sashelp.class(obs=5); run;

Koen

tinaz5012
Obsidian | Level 7

Awesome! Thank you very much!

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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