<?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 generate png file with wired name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790517#M253115</link>
    <description>My SAS version is SAS9.4 TS1M5.&lt;BR /&gt;</description>
    <pubDate>Mon, 17 Jan 2022 13:07:48 GMT</pubDate>
    <dc:creator>whymath</dc:creator>
    <dc:date>2022-01-17T13:07:48Z</dc:date>
    <item>
      <title>SAS generate png file with wired name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790516#M253114</link>
      <description>&lt;P&gt;I want to generate a png file through ods listing and ods graphics, and I found a wired thing, with the name of png file.&lt;/P&gt;
&lt;P&gt;My code is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods listing gpath='D:\' dpi=300 style=htmlblue;
ods graphics/reset=all imagename='test' imagefmt=png;
proc sgplot data=sashelp.class;
  scatter x=height y=weight/group=sex;
run;
ods _all_ close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Condition A:&lt;/P&gt;
&lt;P&gt;There is 0 result at results window. Run the code and get a png file named&lt;STRONG&gt; "test1.png"&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;Condition B:&lt;/P&gt;
&lt;P&gt;There is at least 1 result at results window. Run the code and get a png file named&lt;STRONG&gt; "test.png"&lt;/STRONG&gt;;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How it happens? I want the result is always "&lt;STRONG&gt;test.png&lt;/STRONG&gt;", what shoud I do?&lt;/P&gt;
&lt;P&gt;Thanks for any advice.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jan 2022 13:04:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790516#M253114</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2022-01-17T13:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS generate png file with wired name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790517#M253115</link>
      <description>My SAS version is SAS9.4 TS1M5.&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Jan 2022 13:07:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790517#M253115</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2022-01-17T13:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: SAS generate png file with wired name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790518#M253116</link>
      <description>&lt;P&gt;I suggest to close all ODS destinations before you start creating your graph, see example below.&lt;/P&gt;
&lt;P&gt;To always get the same filename use&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics / reset=index;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Sample code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods _all_ close;
ods listing gpath='c:\temp' style=htmlblue;
ods graphics/ reset=index imagename='test' imagefmt=png;
proc sgplot data=sashelp.class;
  scatter x=height y=weight/group=sex;
run;
ods _all_ close;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 17 Jan 2022 13:42:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790518#M253116</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2022-01-17T13:42:27Z</dc:date>
    </item>
    <item>
      <title>Re: SAS generate png file with wired name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790614#M253149</link>
      <description>Amazing! Could you please explain how the first "ods _all_ close;" affect the filename?</description>
      <pubDate>Tue, 18 Jan 2022 02:43:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790614#M253149</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2022-01-18T02:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: SAS generate png file with wired name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790635#M253158</link>
      <description>&lt;P&gt;If you have more than one ODS destination open, more than one Image file might be created. So for your case, it is best to close any open ODS destinations to make sure only one image file is created.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 07:51:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-generate-png-file-with-wired-name/m-p/790635#M253158</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2022-01-18T07:51:59Z</dc:date>
    </item>
  </channel>
</rss>

