Hello all of my friends. Hope all of you are very fine.
This program runs without errors without producing two files
(RTF and TXT) .
"ods rtf file="&path2\r101a01.rtf";
ods listing file="&path2\r101a01.txt";
proc print data=orion.sales(obs=10);
run;
proc means data=orion.sales;
var salary;
run;
ods _all_ close;"
The log is :
Thank you very much for helping, I am looking forward your answers.
Did you intend to create a file named outputr101a01.rtf in the folder named /folders/myfolders/SaSReport/?
Or did you intend to create a file named r101a01.rtf in a folder named /folders/myfolders/SaSReport/output/?
If the latter then make sure to use / and not \ in your code.
ods rtf file="&path2/r101a01.rtf";
On Unix a \ will "escape" or "protect" the next character. In your case since the next character is the letter r the \ is not needed as r does not have any special meaning to escape.
Show the FULL log please including the PROC PRINT, this is a partial log.
And show a screenshot of your myfolders output folder where you expect these files to be from the Server Files and Folders pane.
This folder:
/folders/myfolders/SaSReport/output\
@seamoh wrote:
Hello all of my friends. Hope all of you are very fine.
This program runs without errors without producing two files
(RTF and TXT) .
"ods rtf file="&path2\r101a01.rtf";
ods listing file="&path2\r101a01.txt";
proc print data=orion.sales(obs=10);
run;
proc means data=orion.sales;
var salary;
run;
ods _all_ close;"
The log is :
"1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;NOTE: ODS statements in the SAS Studio environment may disable some output features.7374 title; footnote;75 options nodate nonumber;76 ods _all_ close;NOTE: ODS PDF(WEB) printed no output.(This sometimes results from failing to place a RUN statement before the ODS PDF(WEB) CLOSE statement.)7778 ods rtf file="&path2\r101a01.rtf";NOTE: Writing RTF Body file: /folders/myfolders/SaSReport/output\r101a01.rtf79 ods listing file="&path2\r101a01.txt";8081 proc print data=orion.sales(obs=10);82 run;"Thank you very much for helping, I am looking forward your answers.
If your submitted code does indeed look like
"ods rtf file="&path2\r101a01.rtf"; ods listing file="&path2\r101a01.txt"; proc print data=orion.sales(obs=10); run; proc means data=orion.sales; var salary; run; ods _all_ close;"
You have unbalanced quotes and likely will have to shut down the SAS session and restart to get things straight again.
If you do not actually have those quotes, why did you put them in your question.
Putting code into a code box opened with either the </> or "running man" icon above the message window will set the code aside clearly.
Hello and thank you very much for your recommendations, I will do it then. The quotes are not part of the code. and I haven't any output , and the program doesn't produce any txt and RTF file, please continue to tell your ideas to solve the problem
Thank you for sharing.
Deeply appreciated.
Until you provide the full log and screenshot we can't offer any other suggestions.
Hello this is complete screen of my complete log
I hope it helps, thank you again.
Copy and paste please not a screenshot for the log, it's not legible to me.
And the screenshot of Servers Files and Folders.
Did you intend to create a file named outputr101a01.rtf in the folder named /folders/myfolders/SaSReport/?
Or did you intend to create a file named r101a01.rtf in a folder named /folders/myfolders/SaSReport/output/?
If the latter then make sure to use / and not \ in your code.
ods rtf file="&path2/r101a01.rtf";
On Unix a \ will "escape" or "protect" the next character. In your case since the next character is the letter r the \ is not needed as r does not have any special meaning to escape.
Thank you very much Tom for the solution, deeply appreciated.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.