<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: SAS GPlot, GMap file name control in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GPlot-GMap-file-name-control/m-p/74951#M2776</link>
    <description>Thanks so much for your help.  I was able to make significant progress in resolving my problems.&lt;BR /&gt;
&lt;BR /&gt;
One of the things that I learned along the way was how to clean up after creating graphs so that the numbering schema did not plague my code.  The process involved PROC CATALOG:&lt;BR /&gt;
&lt;BR /&gt;
PROC CATALOG CAT=WORK.Gseg ET=Grseg;&lt;BR /&gt;
    DELETE &amp;amp;fname1 &amp;amp;fname2;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
		&lt;BR /&gt;
PROC CATALOG CAT=WORK.Html ET=Grseg;&lt;BR /&gt;
   DELETE &amp;amp;fname1 &amp;amp;fname2;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
The files that I created are deleted within a macro:&lt;BR /&gt;
&lt;BR /&gt;
X "DEL &amp;amp;_dir\&amp;amp;fname1..htm"; X "DEL &amp;amp;_dir\&amp;amp;fname2..htm"; 	&lt;BR /&gt;
X "DEL &amp;amp;_dir\&amp;amp;fname1..gif"; X "DEL &amp;amp;_dir\&amp;amp;fname2..gif";	&lt;BR /&gt;
&lt;BR /&gt;
The macro itself iterates through the list of files.&lt;BR /&gt;
&lt;BR /&gt;
Stephen</description>
    <pubDate>Thu, 15 Apr 2010 20:11:25 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-04-15T20:11:25Z</dc:date>
    <item>
      <title>SAS GPlot, GMap file name control</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GPlot-GMap-file-name-control/m-p/74949#M2774</link>
      <description>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.&lt;BR /&gt;
&lt;BR /&gt;
Two items would be helpful.&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
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.&lt;BR /&gt;
&lt;BR /&gt;
Thanks in advance.</description>
      <pubDate>Mon, 12 Apr 2010 19:03:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-GPlot-GMap-file-name-control/m-p/74949#M2774</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-04-12T19:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GPlot, GMap file name control</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GPlot-GMap-file-name-control/m-p/74950#M2775</link>
      <description>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.&lt;BR /&gt;
&lt;BR /&gt;
In v9.2, you can use the value of the "by" variable as part of the name, and v9.2 also supports &amp;gt;8 characters for the name of the gif/png specified here! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
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!)&lt;BR /&gt;
&lt;BR /&gt;
Below is a v9.2 example that demonstrates using the by-variable to control the png file name:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%let name=map066;&lt;BR /&gt;
filename odsout '.';&lt;BR /&gt;
&lt;BR /&gt;
data my_data;&lt;BR /&gt;
st='NC'; output;&lt;BR /&gt;
st='SC'; output;&lt;BR /&gt;
st='VA'; output;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
data my_map; set maps.us;&lt;BR /&gt;
st=fipstate(state);&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
GOPTIONS DEVICE=png;&lt;BR /&gt;
ODS LISTING CLOSE;&lt;BR /&gt;
ODS HTML path=odsout body="&amp;amp;name..htm";&lt;BR /&gt;
&lt;BR /&gt;
title "This state is #byval(st)";&lt;BR /&gt;
&lt;BR /&gt;
proc gmap map=my_map data=my_data all;&lt;BR /&gt;
by st;&lt;BR /&gt;
id st;&lt;BR /&gt;
choro st / levels=1&lt;BR /&gt;
 coutline=gray  nolegend&lt;BR /&gt;
 des="" name="&amp;amp;name._#byval(st)";&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
quit;&lt;BR /&gt;
ODS HTML CLOSE;&lt;BR /&gt;
ODS LISTING;</description>
      <pubDate>Mon, 12 Apr 2010 19:28:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-GPlot-GMap-file-name-control/m-p/74950#M2775</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2010-04-12T19:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: SAS GPlot, GMap file name control</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/SAS-GPlot-GMap-file-name-control/m-p/74951#M2776</link>
      <description>Thanks so much for your help.  I was able to make significant progress in resolving my problems.&lt;BR /&gt;
&lt;BR /&gt;
One of the things that I learned along the way was how to clean up after creating graphs so that the numbering schema did not plague my code.  The process involved PROC CATALOG:&lt;BR /&gt;
&lt;BR /&gt;
PROC CATALOG CAT=WORK.Gseg ET=Grseg;&lt;BR /&gt;
    DELETE &amp;amp;fname1 &amp;amp;fname2;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
		&lt;BR /&gt;
PROC CATALOG CAT=WORK.Html ET=Grseg;&lt;BR /&gt;
   DELETE &amp;amp;fname1 &amp;amp;fname2;&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
The files that I created are deleted within a macro:&lt;BR /&gt;
&lt;BR /&gt;
X "DEL &amp;amp;_dir\&amp;amp;fname1..htm"; X "DEL &amp;amp;_dir\&amp;amp;fname2..htm"; 	&lt;BR /&gt;
X "DEL &amp;amp;_dir\&amp;amp;fname1..gif"; X "DEL &amp;amp;_dir\&amp;amp;fname2..gif";	&lt;BR /&gt;
&lt;BR /&gt;
The macro itself iterates through the list of files.&lt;BR /&gt;
&lt;BR /&gt;
Stephen</description>
      <pubDate>Thu, 15 Apr 2010 20:11:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/SAS-GPlot-GMap-file-name-control/m-p/74951#M2776</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-04-15T20:11:25Z</dc:date>
    </item>
  </channel>
</rss>

