Hi:
When I use the following program to send SASHELP.SHOES to 3 different destinations (sorry, I don't have a DDE program that creates an RTF/DOC file):
[pre]
ods rtf file='c:\temp\shoes.rtf';
ods pdf file='c:\temp\shoes.pdf' compress=9;
ods chtml file='c:\temp\shoes.html';
proc print data=sashelp.shoes;
run;
ods _all_ close;
[/pre]
I get the following sizes:
[pre]
SHOES.RTF = 486 KB
SHOES.PDF = 62 KB
SHOES.HTML = 87 KB
[/pre]
When I open SHOES.RTF with Word and RESAVE it as a .DOC file, the resulting
Word file is actually LARGER.
[pre]SHOES.DOC = 659 KB[/pre]
This has ALWAYS been my experience -- that the ODS RTF file is generally smaller than the same ODS RTF file re-saved as a Word Doc. I don't know what DDE is doing that is making the Word doc smaller in size. Perhaps DDE is generating very "spare" RTF or Word document instructions with no formatting or not in tables. But without knowing what the DDE process is or is not adding to your data or procedure output, it's very hard to compare ODS RTF to DDE. Does your DDE output look EXACTLY like the ODS RTF output or vice versa?
ODS PDF does have a compress option. COMPRESS=9 is the highest level of compression and as you can see, that makes the PDF file smaller than the HTML file that was created with the CHTML destination (CHTML is a destination that creates very, very plain HTML -- without any styles used.)
If I create the output file so there is no TABLE created for the report:
[pre]
ods listing file='c:\temp\shoes.txt';
proc print data=sashelp.shoes;
run;
ods _all_ close;
[/pre]
Then [pre]SHOES.TXT = 45 KB [/pre] in size (the smallest size of all ODS output -- but as I said, every "row" is just one line in the Word doc ... there is no TABLE structure added.) However, if I just re-save this LISTING file as a Word doc, then the file size is: [pre]SHOES_TXT.DOC = 79 KB [/pre] -- still with no table structure, however, you can see that just saving the equivalent of the plain text file as a Word doc, did add some overhead to the file size -- that's because the Word format is proprietary. RTF, in my experience is verbose, but still generally smaller than a WORD doc. However, since the RTF is just an ASCII text file, it does ZIP or compress nicely.
Depending on what your DDE file is creating, perhaps it comes down to the formatting that's added by ODS RTF to make the report table be a table and look nice in Word. What happens if you open the DDE-created file with Word and then resave the file as a Word doc?? Does the file size get bigger or smaller?
You could switch to ODS CHTML or ODS PDF for your output if you want to get a smaller file. The HTML file created with ODS CHTML -will- open in Word 97 and higher. It'll be pretty plain, although the rows will still be in a TABLE. If you added a style template into the mix (ODS MSOFFICE2K creates Microsoft-flavor HTML):
[pre]
ods msoffice2k file='c:\temp\shoes_rtfstyle.html' style=rtf;
proc print data=sashelp.shoes;
run;
ods _all_ close;
[/pre]
Then the resulting HTML file get MUCH bigger (more than double but the HTML file is STILL smaller than the same file created with ODS RTF):
[pre]
SHOES.RTF = 486 KB (uses RTF control strings)
SHOES_RTFSTYLE.HTML = 219 KB (HTML version of RTF file using RTF style)
SHOES.HTML = 87 KB (Plain, compact HTML file)
[/pre]
So you can see, it's hard to compare the ODS RTF file with the DDE file without knowing how much "style" information the DDE file is creating.
cynthia