BookmarkSubscribeRSS Feed
SwissC
Obsidian | Level 7

Is there a way to name SGE files produced in ODS?

 

I have

 
ODS graphics on;
ODS RTF file="C:/Users/SwissC/kmplot.rtf" sge=on;
ODS select SurvivalPlot;
 
PROC LIFETEST data=a PLOTS=survival …...
RUN;
 
ODS graphics off;
ODS RTF close sge=off;

 

Now using the above I get a SGE file called SurvivalPlot_RTF.sge.  Is there a way to get the file named kmplot.sge?  I am sure I could do some rename statements to rename the file but I am not sure if that is allowed on our system.

 

* There are possible syntax errors in the code above as it is not copy and pasted from my SAS session.

2 REPLIES 2
SuzanneDorinski
Lapis Lazuli | Level 10

You can use the IMAGENAME option on the ODS GRAPHICS statement to specify the base name.  SAS then adds an underscore followed by the name of the destination.

 

I used the first PROC LIFETEST in the online documentation example 2 as example code below.  

 

The code below produces kmplot_RTF.sge.  

 

ods graphics on / imagename="kmplot"
                  reset=index;

ODS RTF file="/folders/myfolders/ODS RTF/kmplot.rtf" sge=on;

ODS select SurvivalPlot;

proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500);
   time T * Status(0);
   strata Group / test=logrank adjust=sidak;
run;

ODS RTF close;

 

SwissC
Obsidian | Level 7

Cheers, but this still results in a SAS supllied suffix I would rather not have.  In any case it is now not an issue as the client will not accept the sge image.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 521 views
  • 0 likes
  • 2 in conversation