BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

 

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.

1 ACCEPTED SOLUTION

Accepted Solutions
sahoositaram555
Pyrite | Level 9
Thanks ballardw, andreas_lds for your inputs. I have found another way to solve this.

View solution in original post

3 REPLIES 3
andreas_lds
Jade | Level 19

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.

ballardw
Super User

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.

sahoositaram555
Pyrite | Level 9
Thanks ballardw, andreas_lds for your inputs. I have found another way to solve this.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1412 views
  • 0 likes
  • 3 in conversation