I am using both GPLOT and GMAP to create *.gif files in SAS. I would like to control the naming conventions for these files and not be stuck with the default name (e.g. gplot14. gif, gmap5.gif) because I have trouble identifying the correct graphic when I create large numbers of these files.
Two items would be helpful.
First, how do I change the default filename body to something other than gmap or gplot? I would like to identify the contents with meaningful names.
Second, how do I restart the numbering scheme? When I am debugging my programs, the numbers keep incrementing even though I delete the files. I would like to be able to reset the numbers to start over. At this point, I can only reset the number by exiting PC SAS.
You can control the gif/png file name of traditional SAS/Graph procs by using the "name=" option in the proc. This controls the name of the grseg, and that name is also used as the name of the gif/png file.
In v9.2, you can use the value of the "by" variable as part of the name, and v9.2 also supports >8 characters for the name of the gif/png specified here! :-)
If deleting all the grsegs is not re-setting the name auto-increment, I would suggest starting a new SAS session each time - I always run my SAS jobs in batch, so that each time it is a fresh invocation, and therefore I don't have to worry about deleting grsegs to reset the name auto-incrementing, etc. (ymmv!)
Below is a v9.2 example that demonstrates using the by-variable to control the png file name:
filename odsout '.';
data my_map; set maps.us;
ODS LISTING CLOSE;
ODS HTML path=odsout body="&name..htm";
title "This state is #byval(st)";
proc gmap map=my_map data=my_data all;
choro st / levels=1