BookmarkSubscribeRSS Feed
GeorgeSAS
Lapis Lazuli | Level 10
ods listing  gpath="C:\temp\figures" file="street.png";
proc sgplot data=.....
.....
ods listing gpath="C:\temp\figures" file="house.png";
  proc sgplot data=.....
.....


ods listing gpath="C:\temp\figures" file="pet.png";
  proc sgplot data=.....
.....

Hello all;

 

I have three graphs draw from SAS,I want to use ods get the three png files with different names.but SAS automaticlly sign ed same prefix name for these files such as  SGplot1,SGplot2 .......

 

How to customize name for each files from the SAS ods?

 

thanks!

2 REPLIES 2
PGStats
Opal | Level 21

This is how I name my graphic files:

 

ods listing gpath="&path.\Graphiques" style=journal image_dpi=600;
ods graphics / imagename="Biomarker VG" noborder 
    reset=index height=600 width=600;
proc sgplot ....

This will create a graph in a square picture in a file named &path.\Graphiques\Biomarker VG.png with the journal style. The reset=index option forces SAS to start the creation of graphic files with Biomarker VG even if the name already exists in the directory. Otherwise SAS would add a number suffix to the name to make it unique.

 

PG

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2 replies
  • 1546 views
  • 1 like
  • 3 in conversation