The SAS Output Delivery System and reporting techniques

Custom image names

Reply
N/A
Posts: 0

Custom image names

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".
Super Contributor
Posts: 260

Re: Custom image names

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: Custom image names

Posted in reply to deleted_user
Thank you, Olivier. I tried your suggestion and it seems to be working well (on SAS 9.1). Message was edited by: xatta
Ask a Question
Discussion stats
  • 2 replies
  • 139 views
  • 0 likes
  • 2 in conversation