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

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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