![]() | ![]() | ![]() | ![]() |
Some special symbols will not be displayed properly in Microsoft Word if the ODS RTF code is run from a DBCS version of SAS. The code below illustrates an example where the "plus/minus" and "mu" symbols are requested and display properly when generated from an SBCS version of SAS.
ods escapechar='^';
data test ;
length X1 $ 40 ;
X1 = " 20"||"^S={font_face=Symbol}"||"6D"x||"^S={}"||"g/dL";
output;
X1 = "25.3"||"^S={font_face=Symbol}"||"B1"x||"^S={}"||"12.1";
output;
run ;
ods listing close;
ods rtf file='file.rtf';
proc print ;run;
ods rtf close;
A Technical Support hot fix for Release 8.2 (TS2M0) (with Asian Language Support) for this issue is available at: http://www.sas.com/techsup/download/hotfix/82_dbcs_prod_list.html#010821
Once the hotfix mentioned above is installed, the next two steps are recommended:
1. A default printer must be available to the SAS session. This can be verified with:
PROC OPTIONS OPTION=SYSPRINT; run;
If the SYSPRINT option contains no value, a local/network printer must be installed in order for the hotfix to work as needed.
2. The following PROC TEMPLATE code must be run:
proc template;
define style Styles.Rtf;
parent = styles.printer;
style titleAndNoteContainer from titleAndNoteContainer /
outputwidth = _undef_;
replace cell from container /
linkcolor = colors('link2');
style table from table /
cellpadding = 3pt;
style batch from batch /
cellspacing = 0pt cellpadding = 0pt frame = void rules = none;
replace Body from Document "Controls the Body file." /
leftmargin = 0.25in rightmargin = 0.25in topmargin = 0.25in
bottommargin = 0.25in;
replace fonts /
'docFont' = ("MS Shell Dlg, Courier",10pt)
'headingFont' = ("MS Shell Dlg, Courier",11pt,Bold)
'headingEmphasisFont' = ("MS Shell Dlg, Courier",11pt,Bold
Italic)
'FixedFont' = ("MS Shell Dlg, Courier",9pt)
'BatchFixedFont' = ("MS Shell Dlg, Courier",6.7pt)
'FixedHeadingFont' = ("MS Shell Dlg, Courier",9pt,Bold)
'FixedStrongFont' = ("MS Shell Dlg, Courier",9pt,Bold)
'FixedEmphasisFont' = ("MS Shell Dlg, Courier",9pt,Italic)
'EmphasisFont' = ("MS Shell Dlg, Courier",10pt,Italic)
'StrongFont' = ("MS Shell Dlg, Courier",10pt,Bold)
'TitleFont' = ("MS Shell Dlg, Courier",13pt,Bold Italic)
'TitleFont2' = ("MS Shell Dlg, Courier",12pt,Bold Italic);
end;
run;
Because the SYMBOL font setting in the RTF file's header is incorrect, the above might still not provide all of the requested symbols. If this is the case, the DATA step code below will correct the problem by postprocessing the file:
%macro fix_font(source,out);
data temp ;
length line $400;
infile "&source" length=lg lrecl=1000 end=eof;
input @1 line $varying400. lg;
data _null_;
set temp ;
file "&out";
/* find the problematic syntax FCHARSET0 and change it to FCHARSET2 */
if index(line,"{\f2\ftech\fprq2\fcharset0 Symbol;}") = 1 then
line=tranwrd(line, "{\f2\ftech\fprq2\fcharset0 Symbol;}",
"{\f2\ftech\fprq2\fcharset2 Symbol;}") ;
/* just move the line */
put line ;
run;
%mend;
%fix_font(before.rtf,after.rtf)
| Product Family | Product | System | SAS Release | |
| Reported | Fixed* | |||
| SAS System | Base SAS | Microsoft Windows NT Workstation | 8.2 TS2M0 | |
| Microsoft Windows XP Professional | 8.2 TS2M0 | 9.2 TS1M0 | ||
| Microsoft Windows Server 2003 Enterprise Edition | 8.2 TS2M0 | 9.2 TS1M0 | ||
| Microsoft Windows Server 2003 Standard Edition | 8.2 TS2M0 | 9.2 TS1M0 | ||
| Microsoft Windows 95/98 | 8.2 TS2M0 | |||
| Windows Millennium Edition (Me) | 8.2 TS2M0 | |||
| Microsoft Windows 2000 Server | 8.2 TS2M0 | |||
| Microsoft Windows Server 2003 Datacenter Edition | 8.2 TS2M0 | 9.2 TS1M0 | ||
| Microsoft Windows 2000 Advanced Server | 8.2 TS2M0 | |||
| Microsoft Windows 2000 Datacenter Server | 8.2 TS2M0 | |||
| Microsoft Windows 2000 Professional | 8.2 TS2M0 | |||
| z/OS | 8.2 TS2M0 | 9.2 TS1M0 | ||
| OpenVMS VAX | 8.2 TS2M0 | 9.2 TS1M0 | ||
| OS/2 | 8.2 TS2M0 | |||
| 64-bit Enabled AIX | 8.2 TS2M0 | 9.2 TS1M0 | ||
| 64-bit Enabled HP-UX | 8.2 TS2M0 | 9.2 TS1M0 | ||
| 64-bit Enabled Solaris | 8.2 TS2M0 | 9.2 TS1M0 | ||
| ABI+ for Intel Architecture | 8.2 TS2M0 | 9.2 TS1M0 | ||
| AIX | 8.2 TS2M0 | 9.2 TS1M0 | ||
| HP-UX | 8.2 TS2M0 | 9.2 TS1M0 | ||
| IRIX | 8.2 TS2M0 | 9.2 TS1M0 | ||
| Linux | 8.2 TS2M0 | 9.2 TS1M0 | ||
| OpenVMS Alpha | 8.2 TS2M0 | 9.2 TS1M0 | ||
| Solaris | 8.2 TS2M0 | 9.2 TS1M0 | ||
| Tru64 UNIX | 8.2 TS2M0 | 9.2 TS1M0 | ||
A fix for Release 8.2 (TS2M0) with Asian Language Support (DBCS) for this issue is available at:
http://www.sas.com/techsup/download/hotfix/82_dbcs_prod_list.html#010821| Type: | Problem Note |
| Priority: | medium |
| Topic: | SAS Reference ==> ODS (Output Delivery System) |
| Date Modified: | 2007-05-22 15:07:12 |
| Date Created: | 2003-09-12 15:51:52 |




