Usage Note 24034: Can I append to an ODS RTF file?
Currently it's not possible to append to an RTF file.
This is because
an RTF document is composed of orderly parts. As it builds, it stores
information for colors, fonts, body, header, and so on. At the close, it
puts the different parts in order. Therefore, simply appending
is not appropriate for the structure
of an RTF document.
The sample code in the FULL CODE tab shows how to use multiple RTF instances to route to more than one RTF file at a time, resulting in four files: COMBINED.RTF has three PROC REPORT tables, while A.RTF, B.RTF and C.RTF each contain the results from single PROC REPORT steps. This logic might help prevent the need for appending RTF files outside SAS.
See more information about
PROC TEMPLATE and the RTF destination.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
This code uses multiple RTF instances to route to more than one RTF file at a time, resulting in four files: COMBINED.RTF has three PROC REPORT tables, while A.RTF, B.RTF and C.RTF each contain the results from single PROC REPORT steps.
ods rtf file="combined.rtf";
ods rtf(a) file="a.rtf";
proc report nowd data=sashelp.class(obs=10);
title "In COMBINED.RTF and A.RTF";
run;
ods rtf(a) close;
ods rtf(b) file="b.rtf";
proc report nowd data=sashelp.vtable(obs=20);
title "In COMBINED.RTF and B.RTF";
column libname memname nobs nvar crdate;
run;
ods rtf(b) close;
ods rtf(c) file="c.rtf" ;
proc report nowd data=sashelp.class;
title "In COMBINED.RTF and C.RTF";
run;
ods rtf(c) close;
ods rtf close;
/* or use this shortcut to close all ODS destinations */
/* ods _all_ close; */
| Type: | Usage Note |
| Priority: | low |
| Topic: | SAS Reference ==> ODS (Output Delivery System) Third Party ==> Output ==> RTF
|
| Date Modified: | 2009-02-20 10:51:24 |
| Date Created: | 2004-06-28 12:02:22 |