Hi experts,
I have 3 x.rtf, y.rtf, z.rtf in path. I would like to merge them to make a single document.
For this i'm referring to the directory where all the .rtf files present by a libname statement and later i have planned to use them in proc document as written below.
it throws error as in the proc document step extension(.rtf) cant read by sas.
libname docs "path mentioned here";
ods rtf file="new_path\combined_document.rtf";
proc document name= docs.x.rtf;
replay;
run;
quit;
proc document name=docs.y.rtf;
replay;
run;
quit;
proc document name=docs.z.rtf;
replay;
run;
quit;
ods _all_ close;
Kindly suggest how to resolve this or any other way by which i can take the existing .rtf documents and combine them by some way please do suggest. It would be helpful if someone can help me know how to refer a rtf file present in a directory.
I don't think that you can access rtf-files through a library, at least not with any engine i have ever seen. So you might have to re-think the process, i am sure that better tools exist to merge rtf-files than using sas-code.
Proc Document processes SAS output, not RTF files, for restructuring.
Combining existing RTF files is a Word processor task generally. Or at least not a SAS process.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.