<?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 Updating an ODS Graphics template, but the procedure is still using the old one. in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329464#M11518</link>
    <description>&lt;P&gt;Dear All,&lt;BR /&gt;&lt;BR /&gt;I'm following some guidelines to update the title of a standard plot coming from an ODS graphics procedure inside the proc univariate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;basically I'm taking the template saved as "base.univariate.Graphics.Plots" with the procedure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
source&amp;nbsp;base.univariate.Graphics.Plots / file='C:\Myfile.txt';
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;then I'm copy-pasting it into a sas program, changing the second default title to the title that I need:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc template;
define statgraph base.univariate.Graphics.Plots;
   dynamic _VARNAME _VARLABEL _REFINT _REFSLOPE _WEIGHTED _TITLE1_NONE _GRAPH_TITLE1 _TITLE1_VARLABEL _GRAPH_TITLE2 _GRAPH_FOOTNOTE1 _GRAPH_FOOTNOTE2 _byline_ _bytitle_ _byfootnote_;
   BeginGraph ;
      if (_WEIGHTED)
         if (NOT EXISTS(_TITLE1_NONE))
            if (EXISTS(_GRAPH_TITLE1))
               EntryTitle _GRAPH_TITLE1;
            else
               if (_TITLE1_VARLABEL)
                  EntryTitle "Weighted Distribution and Probability Plot for " _VARLABEL;
               else
                  EntryTitle "Weighted Distribution and Probability Plot for " _VARNAME;
               endif;
            endif;
         endif;
         if (EXISTS(_GRAPH_TITLE2))
            EntryTitle _GRAPH_TITLE2;
         endif;
      else
         if (NOT EXISTS(_TITLE1_NONE))
            if (EXISTS(_GRAPH_TITLE1))
               EntryTitle _GRAPH_TITLE1;
            else
               if (_TITLE1_VARLABEL)
                  EntryTitle "Treatment: &amp;amp;TRT. ";
               else
                  EntryTitle "Treatment: &amp;amp;TRT.";
               endif;
            endif;
         endif;
         if (EXISTS(_GRAPH_TITLE2))
            EntryTitle _GRAPH_TITLE2;
         endif;
      endif;
      Layout Gridded / rows=2 rowgutter=1.0pct;
         Layout Lattice / columns=2 columnweights=(0.8 0.2) columngutter=0.5pct rowdatarange=union;
            RowAxes;
               RowAxis / label=_VARLABEL;
            EndRowAxes;
            HistogramParm x=BINX y=BINCOUNT / orient=horizontal;
            BoxplotParm stat=STAT y=VALUE / outliertip=(Y);
         EndLayout;
         Layout Overlay / xaxisopts=(label="Normal Quantiles" linearopts=(thresholdmin=1 thresholdmax=1)) yaxisopts=(label=_VARLABEL);
            ScatterPlot x=QUANTILE y=DATA;
            LineParm x=0 y=_REFINT slope=_REFSLOPE / clip=TRUE extend=TRUE lineattrs=GRAPHFIT;
         EndLayout;

      EndLayout;


      if (EXISTS(_GRAPH_FOOTNOTE1))
         EntryFootnote _GRAPH_FOOTNOTE1;
      endif;
      if (EXISTS(_GRAPH_FOOTNOTE2))
         EntryFootnote _GRAPH_FOOTNOTE2;
      endif;
      if (_BYTITLE_)
         entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT;
      else
         if (_BYFOOTNOTE_)
            entryfootnote halign=left _BYLINE_;
         endif;
      endif;
   EndGraph;
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I've just modified the second kind of layout title with the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;               if (_TITLE1_VARLABEL)
                  EntryTitle "Treatment: &amp;amp;TRT. ";
               else
                  EntryTitle "Treatment: &amp;amp;TRT.";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The SAS log says:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: STATGRAPH 'Base.Univariate.Graphics.Plots' has been saved to: SASUSER.TEMPLATE
NOTE: PROCEDURE TEMPLATE used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As it is expected to do (according to the guidelines).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when I'm launching my procedure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics /  reset=index imagefmt=png imagename="MyImage" width=10cm height=10cm;

proc univariate data=MyDataset plot;
	var MyVar;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS is still retrieving the standard output, instead of first trying to read the custom one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone please help me, and explain what is happening?&lt;BR /&gt;I'm afraid is some sort of catalog issue but can't find a proper solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2017 15:29:33 GMT</pubDate>
    <dc:creator>scan</dc:creator>
    <dc:date>2017-02-02T15:29:33Z</dc:date>
    <item>
      <title>Updating an ODS Graphics template, but the procedure is still using the old one.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329464#M11518</link>
      <description>&lt;P&gt;Dear All,&lt;BR /&gt;&lt;BR /&gt;I'm following some guidelines to update the title of a standard plot coming from an ODS graphics procedure inside the proc univariate.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;basically I'm taking the template saved as "base.univariate.Graphics.Plots" with the procedure&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc template;
source&amp;nbsp;base.univariate.Graphics.Plots / file='C:\Myfile.txt';
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;then I'm copy-pasting it into a sas program, changing the second default title to the title that I need:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc template;
define statgraph base.univariate.Graphics.Plots;
   dynamic _VARNAME _VARLABEL _REFINT _REFSLOPE _WEIGHTED _TITLE1_NONE _GRAPH_TITLE1 _TITLE1_VARLABEL _GRAPH_TITLE2 _GRAPH_FOOTNOTE1 _GRAPH_FOOTNOTE2 _byline_ _bytitle_ _byfootnote_;
   BeginGraph ;
      if (_WEIGHTED)
         if (NOT EXISTS(_TITLE1_NONE))
            if (EXISTS(_GRAPH_TITLE1))
               EntryTitle _GRAPH_TITLE1;
            else
               if (_TITLE1_VARLABEL)
                  EntryTitle "Weighted Distribution and Probability Plot for " _VARLABEL;
               else
                  EntryTitle "Weighted Distribution and Probability Plot for " _VARNAME;
               endif;
            endif;
         endif;
         if (EXISTS(_GRAPH_TITLE2))
            EntryTitle _GRAPH_TITLE2;
         endif;
      else
         if (NOT EXISTS(_TITLE1_NONE))
            if (EXISTS(_GRAPH_TITLE1))
               EntryTitle _GRAPH_TITLE1;
            else
               if (_TITLE1_VARLABEL)
                  EntryTitle "Treatment: &amp;amp;TRT. ";
               else
                  EntryTitle "Treatment: &amp;amp;TRT.";
               endif;
            endif;
         endif;
         if (EXISTS(_GRAPH_TITLE2))
            EntryTitle _GRAPH_TITLE2;
         endif;
      endif;
      Layout Gridded / rows=2 rowgutter=1.0pct;
         Layout Lattice / columns=2 columnweights=(0.8 0.2) columngutter=0.5pct rowdatarange=union;
            RowAxes;
               RowAxis / label=_VARLABEL;
            EndRowAxes;
            HistogramParm x=BINX y=BINCOUNT / orient=horizontal;
            BoxplotParm stat=STAT y=VALUE / outliertip=(Y);
         EndLayout;
         Layout Overlay / xaxisopts=(label="Normal Quantiles" linearopts=(thresholdmin=1 thresholdmax=1)) yaxisopts=(label=_VARLABEL);
            ScatterPlot x=QUANTILE y=DATA;
            LineParm x=0 y=_REFINT slope=_REFSLOPE / clip=TRUE extend=TRUE lineattrs=GRAPHFIT;
         EndLayout;

      EndLayout;


      if (EXISTS(_GRAPH_FOOTNOTE1))
         EntryFootnote _GRAPH_FOOTNOTE1;
      endif;
      if (EXISTS(_GRAPH_FOOTNOTE2))
         EntryFootnote _GRAPH_FOOTNOTE2;
      endif;
      if (_BYTITLE_)
         entrytitle _BYLINE_ / textattrs=GRAPHVALUETEXT;
      else
         if (_BYFOOTNOTE_)
            entryfootnote halign=left _BYLINE_;
         endif;
      endif;
   EndGraph;
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I've just modified the second kind of layout title with the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;               if (_TITLE1_VARLABEL)
                  EntryTitle "Treatment: &amp;amp;TRT. ";
               else
                  EntryTitle "Treatment: &amp;amp;TRT.";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The SAS log says:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: STATGRAPH 'Base.Univariate.Graphics.Plots' has been saved to: SASUSER.TEMPLATE
NOTE: PROCEDURE TEMPLATE used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;As it is expected to do (according to the guidelines).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when I'm launching my procedure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods graphics /  reset=index imagefmt=png imagename="MyImage" width=10cm height=10cm;

proc univariate data=MyDataset plot;
	var MyVar;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;SAS is still retrieving the standard output, instead of first trying to read the custom one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can someone please help me, and explain what is happening?&lt;BR /&gt;I'm afraid is some sort of catalog issue but can't find a proper solution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 15:29:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329464#M11518</guid>
      <dc:creator>scan</dc:creator>
      <dc:date>2017-02-02T15:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Updating an ODS Graphics template, but the procedure is still using the old one.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329472#M11519</link>
      <description>&lt;P&gt;Check the ODS PATH settings. &amp;nbsp;It should include SASUSER.TEMPLAT and SASHELP.TMPLMST. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Youcan set it. using:&lt;/P&gt;
&lt;P&gt;ODS PATH &lt;SPAN&gt;SASUSER.TEMPLAT&lt;/SPAN&gt;(update) &lt;SPAN&gt;SASHELP.TMPLMST&lt;/SPAN&gt;(read) ;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/odsug/69832/HTML/default/viewer.htm#p03q7l9284sg38n1d9186k3i7u3c.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_ods_sect006.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 15:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329472#M11519</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-02-02T15:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: Updating an ODS Graphics template, but the procedure is still using the old one.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329476#M11520</link>
      <description>&lt;P&gt;Dear Sanjay,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I do really like&amp;nbsp;your book and your presentation at the PhUSE conference was great.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, thanks for the answer. I struggled on this for an entire day and now you solved it with a statement. Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 15:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329476#M11520</guid>
      <dc:creator>scan</dc:creator>
      <dc:date>2017-02-02T15:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: Updating an ODS Graphics template, but the procedure is still using the old one.</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329481#M11521</link>
      <description>You are most welcome.  I appreciate your endorsement for the book.&lt;BR /&gt;</description>
      <pubDate>Thu, 02 Feb 2017 15:50:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Updating-an-ODS-Graphics-template-but-the-procedure-is-still/m-p/329481#M11521</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-02-02T15:50:13Z</dc:date>
    </item>
  </channel>
</rss>

