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;
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;
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!
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.