BookmarkSubscribeRSS Feed
aellman
Fluorite | Level 6

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;

4 REPLIES 4
Cynthia_sas
SAS Super FREQ
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
aellman
Fluorite | Level 6

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;

Cynthia_sas
SAS Super FREQ
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
aellman
Fluorite | Level 6

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!

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 2861 views
  • 0 likes
  • 2 in conversation