BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi, is there a way to turn off the automatic numbering of images in my ods output? I know I can change the base of the file name with the name= option. But I would like to create a series of images called "widget", "thing", and "another", but not "widget0", "thing1", and "another2".
2 REPLIES 2
Olivier
Pyrite | Level 9
Hi.
The reason why numbers are added at the end of the name is that SAS recalls that it has already given such a name. Its memory consists of catalogs in WORK (or wherever you said it was, using the option GOUT in your graphic procedure).
If you run 9.1 or 8.2, the only requirement is to add at the beginning of your code
[pre]
PROC CATALOG CAT=work.gseg KILL ;
RUN ; QUIT ;
[/pre]
It will clear all memory of creating images with the name you want to use.

Testing the following code in SAS 9.2,
[pre]
ODS HTML GPATH="c:\temp" ;
PROC GPLOT DATA=sashelp.class ;
PLOT weight * height / NAME="widget" ;
RUN ; QUIT ;
ODS HTML CLOSE ;
[/pre]
it appeared that killing the GSEG catalog was not enough : there was a copy of the names in a HTML catalog, located in WORK either. That looks strange (because I don't remember SAS ever behaving this way... by the way, you 9.2 guys, am I missing something at this point ???), but anyway, when you get reed of BOTH catalogs, that works out fine.
So try :
[pre]
PROC CATALOG CAT=work.gseg KILL ;
RUN ; QUIT ;
PROC CATALOG CAT=work.html KILL ;
RUN ; QUIT ;
[/pre]
before your favorite G procedure to create images with the correct name.
Regards,
Olivier
deleted_user
Not applicable
Thank you, Olivier. I tried your suggestion and it seems to be working well (on SAS 9.1). Message was edited by: xatta

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
  • 2 replies
  • 668 views
  • 0 likes
  • 2 in conversation