I would like to combine 100 rtf files in one rtf file using SAS studio.
Thanks for your help.
Dear All,
Please note that I found a macros that is combining multiple rtf file in one single rtf file and it works very well.
Thanks.
Kind regards,
Amine
Are you creating those 100 rtf files in sas? If yes, then what is your code to create those files?
Not really a SAS job to combine already existing files.
If you created them from SAS then the proper way is to create ONE file instead of 100s. Easy to do in theory: wrap all of the output creating steps that write to the RTF in single ODS RTF call:
Dummy code:
Ods rtf file="<path>\bigfile.rtf" <other rtf options>; <first proc step that creates output> <second proc step that creates output> <repeat until last proc step that creates output> ods rtf close;
Or create the output and use Proc document to gather all the output together for the rtf output.
If you have "different sas codes" you could use %include to call separate SAS files but you would want to remove the specific ods rtf output/close in any of them to use the above approach.
In this case, you should put all your codes inside a single ODS RTF sandwich as suggested in previous comments. See additional comments here.
Dear All,
Please note that I found a macros that is combining multiple rtf file in one single rtf file and it works very well.
Thanks.
Kind regards,
Amine
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.