Thank you @Cynthia_sas, the solution worked.
Also Thank @ballardw for the suggestion of ods escapechar="^".
I tried the ods escapechar="^" option as below and it gave me the expected result.
data have;
txt='AAA BBB CCC';
comment=tranwrd(txt,'BBB','^S={foreground=red}BBB');
comment=tranwrd(comment,'BBB','BBB^S={}');
run;
ods listing close;
ods pdf file="./sample.pdf";
ods escapechar="^";
PROC REPORT DATA=have LS=132 PS=60 SPLIT="/" CENTER style(summary)=Header;
COLUMN comment ;
DEFINE comment / DISPLAY WIDTH=30 SPACING=2 LEFT " " ;
run;
title;
ods pdf close;
ods listing;
... View more