<?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: ODS output with an extra 1 at the end of the image name in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562767#M157689</link>
    <description>&lt;P&gt;It happened repeatedly. I don't have that "ods html" envelope (below) outside of ods graphics, because I only need the picture file but not the html. Could this be why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;ods&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;html&lt;/SPAN&gt; &lt;SPAN class="token statement"&gt;file&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"%sysfunc(pathname(WORK))\abcde.htm"&lt;/SPAN&gt;      &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
...
&lt;SPAN class="token statement"&gt;ods&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;html&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;close&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 31 May 2019 04:41:09 GMT</pubDate>
    <dc:creator>lingcx</dc:creator>
    <dc:date>2019-05-31T04:41:09Z</dc:date>
    <item>
      <title>ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562723#M157663</link>
      <description>&lt;P&gt;I'm creating plots from proc univariate or proc sgplot. It seems that the system always automatically adds a "1" at the end of my imagename. In the example below, it will give me a plot names "abcde1".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods graphics on / reset width=8in height=6in imagename="abcde";&lt;BR /&gt;proc univariate data=Stats;&lt;BR /&gt;var x;&lt;BR /&gt;histogram / midpoints=10 to 100 by 10;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any clue how to get rid of this? Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 21:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562723#M157663</guid>
      <dc:creator>lingcx</dc:creator>
      <dc:date>2019-05-30T21:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562735#M157672</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;I'm creating plots from proc univariate or proc sgplot. It seems that the system always automatically adds a "1" at the end of my imagename. In the example below, it will give me a plot names "abcde1".&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ods graphics on / reset width=8in height=6in imagename="abcde";&lt;BR /&gt;proc univariate data=Stats;&lt;BR /&gt;var x;&lt;BR /&gt;histogram / midpoints=10 to 100 by 10;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any clue how to get rid of this? Thanks!&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't see this. When does it happen for you?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html file="%sysfunc(pathname(WORK))\abcde.htm"      ;
ods graphics on / reset width=8in height=6in imagename="abcde";
proc univariate data=sashelp.class;
var weight;
histogram / midpoints=10 to 100 by 10;
run;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 142px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29915i012FF032B05A8990/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2019 22:40:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562735#M157672</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-05-30T22:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562767#M157689</link>
      <description>&lt;P&gt;It happened repeatedly. I don't have that "ods html" envelope (below) outside of ods graphics, because I only need the picture file but not the html. Could this be why?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token statement"&gt;ods&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;html&lt;/SPAN&gt; &lt;SPAN class="token statement"&gt;file&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"%sysfunc(pathname(WORK))\abcde.htm"&lt;/SPAN&gt;      &lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
...
&lt;SPAN class="token statement"&gt;ods&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;html&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;close&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 04:41:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562767#M157689</guid>
      <dc:creator>lingcx</dc:creator>
      <dc:date>2019-05-31T04:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562768#M157690</link>
      <description>&lt;P&gt;Where do you see a different name?&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 04:51:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562768#M157690</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-05-31T04:51:07Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562775#M157696</link>
      <description>&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Like "&lt;SPAN&gt;abcde1.png" in my folder. Really weird.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 05:42:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562775#M157696</guid>
      <dc:creator>lingcx</dc:creator>
      <dc:date>2019-05-31T05:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562831#M157720</link>
      <description>&lt;P&gt;Ok, I think I've figured out the issue following this post:&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/Graphics-Programming/ODS-Graphics-Index-Counter-Resets-to-1/td-p/208901" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/Graphics-Programming/ODS-Graphics-Index-Counter-Resets-to-1/td-p/208901&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But their solution did not work. In other words, adding ODS HTML close (or ODS LISTING CLOSE) did not work when I was trying a different type of output. What I had to go was go into the EG settings (Tools-&amp;gt;Option&amp;gt;-Results) and uncheck HTML. After doing that, the example code posted above, modified to use a listing output, produced an image name with no index attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What's happening is that there are two ODS outputs open; listing and html and that's why the index is showing up. Closing the HTML output leaves one output and no index appears in your image name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 13:38:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562831#M157720</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-05-31T13:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562838#M157723</link>
      <description>&lt;P&gt;Try&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ods graphics on / reset=index&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 13:50:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562838#M157723</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-05-31T13:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562841#M157726</link>
      <description>&lt;P&gt;That didn't work for me. I have the same issue as the original poster. The issue turns out to be, at least for me using SAS EG, that there is a default HTML destination opened in SAS EG, opened even if you don't specify ODS HTML; in your code, and I had to turn off the default HTML results destination in SAS EG before I could get the&amp;nbsp; index to be suppressed.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Try&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ods graphics on / reset=index&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 13:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562841#M157726</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-05-31T13:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562902#M157749</link>
      <description>Can you show a screenshot of the folder with the files in them with the names please?&lt;BR /&gt;&lt;BR /&gt;I've seen this happen in OneDrive and Google Drive because of versioning by the way. It's quick and hard to notice but it does happen.</description>
      <pubDate>Fri, 31 May 2019 16:29:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562902#M157749</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-05-31T16:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562922#M157758</link>
      <description>&lt;BLOCKQUOTE&gt;Here you go. Code with results. HTML is the only thing selected under EG results formats.&lt;BR /&gt;Specifying reset=index doesn't change the behavior. If I uncheck HTML in the SAS EG results viewer page and run the code below then it does not add a number to the end of abcde in the name of the .png file.&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods html path="/rtpnfil02/rtpnfil02_vol6/CSDS/CENTER/dhw/Test/" gpath="/rtpnfil02/rtpnfil02_vol6/CSDS/CENTER/dhw/Test";
ods graphics on / reset width=8in height=6in imagename="abcde" ;
proc univariate data=sashelp.class;
var weight;
histogram / midpoints=10 to 100 by 10;
run;
ods html close;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS_filename.jpg" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29922iAAA24A23785614D5/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS_filename.jpg" alt="SAS_filename.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 17:15:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/562922#M157758</guid>
      <dc:creator>DWilson</dc:creator>
      <dc:date>2019-05-31T17:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/563002#M157781</link>
      <description>&lt;P&gt;Interesting.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;reset=INDEX solved my problem. Thanks!!&lt;/P&gt;</description>
      <pubDate>Fri, 31 May 2019 19:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/563002#M157781</guid>
      <dc:creator>lingcx</dc:creator>
      <dc:date>2019-05-31T19:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/729427#M226980</link>
      <description>&lt;P&gt;I've dealt with the same issue for various projects and I FINALLY figured out what I was doing wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will NOT work:&lt;/P&gt;&lt;PRE&gt;ODS GRAPHICS / reset=index IMAGENAME="my_map" IMAGEFMT=png NOBORDER;
ODS HTML PATH="X:\abc\def" (URL=none);
PROC SGMAP MAPDATA=data1 MAPRESPDATA=data2 NOAUTOLEGEND; 
  ESRIMAP URL='http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base';
  CHOROMAP abc / MAPID=def ID=def DISCRETE;
RUN;&lt;/PRE&gt;&lt;P&gt;But this DOES work:&lt;/P&gt;&lt;PRE&gt;ODS HTML PATH="X:\abc\def" (URL=none);
ODS GRAPHICS / reset=index IMAGENAME="my_map" IMAGEFMT=png NOBORDER;
PROC SGMAP MAPDATA=data1 MAPRESPDATA=data2 NOAUTOLEGEND; 
  ESRIMAP URL='http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base';
  CHOROMAP abc / MAPID=def ID=def DISCRETE;
RUN;&lt;/PRE&gt;&lt;P&gt;Note the order - as long as the ODS GRAPHICS statement is listed &lt;EM&gt;below/after&lt;/EM&gt; the ODS HTML statement, then this works. If it's flipped like I showed in the first code snippet, the code will create a file called 'my_map1.png'.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Mar 2021 15:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/729427#M226980</guid>
      <dc:creator>delonay</dc:creator>
      <dc:date>2021-03-26T15:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: ODS output with an extra 1 at the end of the image name</title>
      <link>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/783422#M249788</link>
      <description>Thanks for your post. It solved my problem.</description>
      <pubDate>Wed, 01 Dec 2021 17:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/ODS-output-with-an-extra-1-at-the-end-of-the-image-name/m-p/783422#M249788</guid>
      <dc:creator>SigmaGo</dc:creator>
      <dc:date>2021-12-01T17:21:31Z</dc:date>
    </item>
  </channel>
</rss>

