The SAS Output Delivery System and reporting techniques

ods select for a proc lifetest survival graph is not outputting to rtf

Reply
Occasional Contributor
Posts: 6

ods select for a proc lifetest survival graph is not outputting to rtf

[ Edited ]

The following code results in a blank rtf file.  Also, strangely enough, after I run this code in SAS Enterprise Guide (on a UNIX platform), there is no output for the rest of the session - it is as if ods no results is on.  I've tried reassigning ods listing, resetting goptions, turning graphics off with no luck.  I have to close the EG session and start over.  I'm running SAS 9.3.  Help and thank you!

 

ods listing close;
ods rtf style=rtf file="/.../Figures1_4.rtf";

ods graphics / reset noborder width=600px height=400px;

ods select survivalplot(persist);

proc lifetest data=final (where=(ds='any')) plots=survival (failure nocensor);
time ptime2 * outcome(0);
run;
quit;
ods rtf close;
ods listing;

SAS Super FREQ
Posts: 8,743

Re: ods select for a proc lifetest survival graph is not outputting to rtf

Hi: This sounds like an issue for Tech Support. Since you don't get any results in the log, it's hard to guess what might be happening. Is your file= option writing to a location on the server where you have WRITE access?? Generally, when you create ODS RTF output using EG, you see an extra RESULTS tab for the RTF output and then when you click the RTF tab, you next have to click the Download button to download the results from the server to your local machine, so you can open the output with Word.

I think the fastest way to get help for this issue is to open a track with Tech Support.

cynthia
Occasional Contributor
Posts: 6

Re: ods select for a proc lifetest survival graph is not outputting to rtf

Thanks, Cynthia.  Yes - like you say, the extra tab for the RTF results did not pop up in EG.  

 

I finally did find additional code online and when I added this in...it worked.  I'm not sure what was missing that I needed but I'm relieved to have output once again.

 

Thanks again.

 

ods listing close;

ods rtf style=rtf file="&path./Figures1_4.rtf";

 

ods graphics on;

ods listing gpath="&path.";

 

 

ods select survivalplot (persist) failureplot (persist);

 

ods graphics/reset=all imagename="TESTimage";

 

proc lifetest data=final plots=survival (failure nocensor);

time ptime2*outcome (0);

run;

quit;

ods rtf close;

SAS Super FREQ
Posts: 8,743

Re: ods select for a proc lifetest survival graph is not outputting to rtf

Hi:
Generally, &path is a "helper" macro variable that we use in our e-learning classes to allow you to write to a known location where you have write access.
Sometimes, if you only put a filename/extension in the FILE= option, then SAS tries to write to a default location where you may or may not have write access. So when dealing with SAS University Edition or SAS OnDemand for Academics access to SAS, it is useful to use &PATH. We create it for every class to point to a write-able directory.

My guess is that somehow, your EG was pointed to a folder location that it didn't like and that when you added &path into the FILE= option, you made EG "happy", so it created the output file.

cynthia
Occasional Contributor
Posts: 6

Re: ods select for a proc lifetest survival graph is not outputting to rtf

Nope - not that either.  I typed &path into this example but I always specify the entire path in the actual code.  It writes to a common folder that I write to all the time.  Wish that was it!

 

I'll mark this as solved since the additional code I added did finally fix it.

 

Thanks for your help!

 

 

Ask a Question
Discussion stats
  • 4 replies
  • 520 views
  • 0 likes
  • 2 in conversation