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

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.
73
74 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.)
77
78 ods rtf file="&path2\r101a01.rtf";
NOTE: Writing RTF Body file: /folders/myfolders/SaSReport/output\r101a01.rtf
79 ods listing file="&path2\r101a01.txt";
80
81 proc print data=orion.sales(obs=10);
82 run;"
Thank you very much for helping, I am looking forward your answers.

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

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.

View solution in original post

9 REPLIES 9
Reeza
Super User

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.
73
74 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.)
77
78 ods rtf file="&path2\r101a01.rtf";
NOTE: Writing RTF Body file: /folders/myfolders/SaSReport/output\r101a01.rtf
79 ods listing file="&path2\r101a01.txt";
80
81 proc print data=orion.sales(obs=10);
82 run;"
Thank you very much for helping, I am looking forward your answers.

 

 

 


 

 

ballardw
Super User

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.

seamoh
Obsidian | Level 7

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.

Reeza
Super User

Until you provide the full log and screenshot we can't offer any other suggestions.

seamoh
Obsidian | Level 7

Hello this is complete screen of my complete log

 

seamoh_0-1591031695337.png

I hope it helps, thank you again.

Reeza
Super User

Copy and paste please not a screenshot for the log, it's not legible to me.

And the screenshot of Servers Files and Folders.

seamoh
Obsidian | Level 7
<1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
NOTE: ODS statements in the SAS Studio environment may disable some output features.
73
74 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.)
77
78 ods rtf file="&path2\r101a01.rtf";
NOTE: Writing RTF Body file: /folders/myfolders/SaSReport/output\r101a01.rtf
79 ods listing file="&path2\r101a01.txt";
80
81 proc print data=orion.sales(obs=10);
82 run;
 
NOTE: There were 10 observations read from the data set ORION.SALES.
NOTE: The PROCEDURE PRINT printed page 1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.05 seconds
cpu time 0.05 seconds
 
 
83
84 proc means data=orion.sales;
85 var salary;
86 run;
 
NOTE: There were 165 observations read from the data set ORION.SALES.
NOTE: The PROCEDURE MEANS printed page 2.
NOTE: PROCEDURE MEANS used (Total process time):
real time 0.05 seconds
cpu time 0.03 seconds
 
 
87
88 ods _all_ close;
89
90 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
102/>
 

 

Tom
Super User Tom
Super User

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.

seamoh
Obsidian | Level 7

Thank you very much Tom for the solution, deeply appreciated.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 9 replies
  • 1321 views
  • 2 likes
  • 4 in conversation