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="^")