I am formatting a report in Proc Report on SAS Viya. I have a column of data that has several Pathogen names. I need to italicize part of the name. For instance, for Salmonella spp., I only need the Salmonella portion italicized. I am using the following compute command:
compute Pathogen ;
if Pathogen="Salmonella spp." then do ;
Pathogen='^{style[fontstyle=italic]Salmonella}^';
end ;
endcomp ;
It works except it is truncating my variable to show only Salmo in italics. Anybody know why it isn't printing the whole word? Once I fix that, how do I add the "spp." back on in non-italics? THANKS!!! (should also mention I'm using ods escapechar="^")
Use the ODS ESCAPECHAR command and the appropriate modifications of you text string. Examples: https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p11xia2ltavr8ln17srq8vn4rnqc.htm#p0xwm6...
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.