<?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: proc sgplot, tmplout= and proc sgrender with vbar &amp;gt; warning and no expected output in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624951#M19478</link>
    <description>Thank you. That's what I needed: adding a _frequency_ variable!</description>
    <pubDate>Fri, 14 Feb 2020 21:05:42 GMT</pubDate>
    <dc:creator>xxformat_com</dc:creator>
    <dc:date>2020-02-14T21:05:42Z</dc:date>
    <item>
      <title>proc sgplot, tmplout= and proc sgrender with vbar &gt; warning and no expected output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624937#M19470</link>
      <description>&lt;P&gt;Why this code don't generate the expected graphic (empty image)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class tmplout="&amp;amp;demo./test.sas";
    vbar sex; 
run;

%include "&amp;amp;demo./test.sas";

proc sgrender data=sashelp.class template=sgplot;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;and generate the following warnings?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; WARNING: The BarChartParm statement named 'VBAR' will not be 
          drawn because one or more of the required arguments 
          were not supplied.
 WARNING: The BarChartParm statement named 'VBAR' will not be 
          drawn because one or more of the required arguments 
          were not supplied.
 WARNING: The BarChartParm statement named 'VBAR' will not be 
          drawn because one or more of the required arguments 
          were not supplied.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 20:20:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624937#M19470</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2020-02-14T20:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot, tmplout= and proc sgrender with vbar &gt; warning and no expected output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624940#M19473</link>
      <description>&lt;P&gt;I think it's because the template has DYNAMIC statements. Those are based on your data and the proc is passing them initially but when you use SGRENDER you need to specify those parameters explicitly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My guess as to what's going on anyways.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/?docsetId=odsproc&amp;amp;docsetTarget=p1kt28i6uur3min15jrps9ttl228c.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=odsproc&amp;amp;docsetTarget=p1kt28i6uur3min15jrps9ttl228c.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/184742"&gt;@xxformat_com&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Why this code don't generate the expected graphic (empty image)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class tmplout="&amp;amp;demo./test.sas";
    vbar sex; 
run;

%include "&amp;amp;demo./test.sas";

proc sgrender data=sashelp.class template=sgplot;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and generate the following warnings?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt; WARNING: The BarChartParm statement named 'VBAR' will not be 
          drawn because one or more of the required arguments 
          were not supplied.
 WARNING: The BarChartParm statement named 'VBAR' will not be 
          drawn because one or more of the required arguments 
          were not supplied.
 WARNING: The BarChartParm statement named 'VBAR' will not be 
          drawn because one or more of the required arguments 
          were not supplied.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2020 20:36:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624940#M19473</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-14T20:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot, tmplout= and proc sgrender with vbar &gt; warning and no expected output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624946#M19475</link>
      <description>&lt;P&gt;Actually taking another look at the code, it's using _freq_ which isn't calculated. So for the graph, SAS is first calculating the data and then displaying it. That calculation step does not happen with SGRENDER so you need to precalculate your numbers to display them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;EDIT: this does work as expected and is the answer to why it doesn't work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, when you use VBAR SAS first processes the data to get the summaries as requested and then graphs the data. The Templateout only provides the code for graphing the data from the summaries, not the code to generate the summaries. You need to do that step yourself.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's a fully worked example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc sgplot data=sashelp.class tmplout="&amp;amp;path./Demo1.sas" ;
    vbar sex; 
run;



%include "&amp;amp;path./Demo1.sas";

*get your summaries;
proc freq data=sashelp.class;
table sex / out=summary (rename=count=_frequency_);
run;

*graph data;
proc sgrender data=summary template=sgplot;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Feb 2020 21:05:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624946#M19475</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-02-14T21:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot, tmplout= and proc sgrender with vbar &gt; warning and no expected output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624950#M19477</link>
      <description>&lt;P&gt;I first didn't understood your answer and then I got it. The code needs to look as follow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.class tmplout="&amp;amp;demo./test.sas";
    vbar sex; 
run;

%include "&amp;amp;demo./test.sas";


proc sql;
   create table class as
   select sex, count(*) as _FREQUENCY_
   from sashelp.class
   group by sex;
quit;


proc sgrender data=class template=sgplot;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Feb 2020 21:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624950#M19477</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2020-02-14T21:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: proc sgplot, tmplout= and proc sgrender with vbar &gt; warning and no expected output</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624951#M19478</link>
      <description>Thank you. That's what I needed: adding a _frequency_ variable!</description>
      <pubDate>Fri, 14 Feb 2020 21:05:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/proc-sgplot-tmplout-and-proc-sgrender-with-vbar-gt-warning-and/m-p/624951#M19478</guid>
      <dc:creator>xxformat_com</dc:creator>
      <dc:date>2020-02-14T21:05:42Z</dc:date>
    </item>
  </channel>
</rss>

