<?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: #BYVAL  doesn't work in footnote statement? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366944#M87325</link>
    <description>&lt;P&gt;If you need this information in the footnote statement, then I suggest you have a look at programming pattern described by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;, see his blog entries&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2012/03/20/sas-program-by-processing/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2012/03/20/sas-program-by-processing/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2012/03/23/improving-on-a-sas-programming-pattern/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2012/03/23/improving-on-a-sas-programming-pattern/&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Jun 2017 13:31:27 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2017-06-14T13:31:27Z</dc:date>
    <item>
      <title>#BYVAL  doesn't work in footnote statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366719#M87253</link>
      <description>&lt;P&gt;I'm using #BYVAL in a footnote statement in 9.4M3.&amp;nbsp; Looks like the footnote is reporting the value of the next by-group rather than the current by group.&amp;nbsp; It works as expected in the title statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=class;
  by sex;
run;

options nobyline;

proc report data=class nowd;
  by sex;
  title1 "below is print out of: #BYVAL1";
  footnote1 "above is print out of: #BYVAL1";;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;IMG title="byvalue.PNG" alt="byvalue.PNG" src="https://communities.sas.com/t5/image/serverpage/image-id/9389i78E0A14A5D6BBDFE/image-size/original?v=1.0&amp;amp;px=-1" border="0" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looks like same issue as:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/SG-ODS-RTF-BODYTITLE-BYVAL-in-FOOTNOTE-statement/m-p/179260#M6588" target="_blank"&gt;https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/SG-ODS-RTF-BODYTITLE-BYVAL-in-FOOTNOTE-statement/m-p/179260#M6588&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried in 9.3 and get the same result.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this mean that #BYVAL doesn't work well for footnotes?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 18:30:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366719#M87253</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-06-13T18:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: #BYVAL  doesn't work in footnote statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366726#M87254</link>
      <description>&lt;P&gt;Just to add to the merriment, when I test your program (Unix/Linux), I'm getting a footnote that includes the characters "#BYVAL1" without the value of the variable.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 18:49:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366726#M87254</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-06-13T18:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: #BYVAL  doesn't work in footnote statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366778#M87260</link>
      <description>&lt;P&gt;According to the documentation, the #BYVAL, #BYVAR etc. are only available for the TITLE statement, but not in the FOOTNOTE statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See here&lt;/P&gt;
&lt;P&gt;TITLE, &lt;A href="http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p10gcmrmf83iaxn1ilrx4pra969n.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p10gcmrmf83iaxn1ilrx4pra969n.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;FOOTNOTE, &lt;A href="http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n0wh407rnaleinn1rqyudxuzhkhu.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=n0wh407rnaleinn1rqyudxuzhkhu.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So works as documented.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One can argue, that one should get some sort of warning when using the #BY... in a FOOTNOTE statement.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 21:35:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366778#M87260</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-06-13T21:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: #BYVAL  doesn't work in footnote statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366803#M87273</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;: If you don't mind deleting two pages, the following will produce the desired result:&lt;/P&gt;
&lt;PRE&gt;proc sort data=sashelp.class out=class;
  by sex;
run;

data class;
  set class;
  by sex;
  x=0;
  if last.sex then do;
    output;
    x=1;
    output;
  end;
  else output;
run;

options nobyline;

proc report data=class nowd;
  by sex x;
  title1 "below is print out of: #BYVAL1";
  footnote1 "above is print out of: #BYVAL1";
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jun 2017 23:55:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366803#M87273</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-06-13T23:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: #BYVAL  doesn't work in footnote statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366942#M87324</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13711"&gt;@art297&lt;/a&gt;, but in my setting of storted process making web reports, it isn't feasible to delete the extra pages.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 13:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366942#M87324</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-06-14T13:25:57Z</dc:date>
    </item>
    <item>
      <title>Re: #BYVAL  doesn't work in footnote statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366944#M87325</link>
      <description>&lt;P&gt;If you need this information in the footnote statement, then I suggest you have a look at programming pattern described by &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;, see his blog entries&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2012/03/20/sas-program-by-processing/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2012/03/20/sas-program-by-processing/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;and&lt;/P&gt;
&lt;P&gt;&lt;A href="http://blogs.sas.com/content/sasdummy/2012/03/23/improving-on-a-sas-programming-pattern/" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/2012/03/23/improving-on-a-sas-programming-pattern/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 13:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366944#M87325</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2017-06-14T13:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: #BYVAL  doesn't work in footnote statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366946#M87326</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32"&gt;@BrunoMueller&lt;/a&gt;.&amp;nbsp; That's an unfortunate surprise.&amp;nbsp; I hadn't before thought about possible differences between TITLE statements and FOOTNOTE statements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It interesting that in SAS/GRAPH, titles and footnotes are documented together &lt;A href="http://support.sas.com/documentation/cdl/en/graphref/69717/HTML/default/viewer.htm#n19y35ila5aaysn1qor579h9vaak.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/graphref/69717/HTML/default/viewer.htm#n19y35ila5aaysn1qor579h9vaak.htm&lt;/A&gt;, and from the related thread &lt;A href="https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/SG-ODS-RTF-BODYTITLE-BYVAL-in-FOOTNOTE-statement/m-p/179260#M6588" target="_blank"&gt;https://communities.sas.com/t5/SAS-GRAPH-and-ODS-Graphics/SG-ODS-RTF-BODYTITLE-BYVAL-in-FOOTNOTE-statement/m-p/179260#M6588&lt;/A&gt; it looks like using #BYVAL in&amp;nbsp;&amp;nbsp;a SAS/GRAPH or&amp;nbsp;SG plot&amp;nbsp;footnote works, as long as you use GFOOTNOTE so that footnote is part of the graph.&amp;nbsp; Maybe I'll put in a idea submisssion to get #BYVAL working in SAS BASE footnotes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I haven't used #BYVAL much.&amp;nbsp; But seems like often when I try, I end up backing away from it and resort to writing my own macro &amp;nbsp;looping.&amp;nbsp; Beause I ended up wanting to use that #BYVAL to somewhere like a footnote or a table of contents link, or a file name, or .... so &amp;amp;BYVAL becomes more flexible.&amp;nbsp; But if I were still in the role of making statistical reports for internal users that didn't have to be pretty, I'm sure I would use #BYVAL more often.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 13:36:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366946#M87326</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-06-14T13:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: #BYVAL  doesn't work in footnote statement?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366951#M87329</link>
      <description>&lt;P&gt;Thanks again &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32"&gt;@BrunoMueller&lt;/a&gt;.&amp;nbsp; Yes, that's the sort of macro looping I generally use.&amp;nbsp; But I thought for this project I might be in a setting where I could use the BY statement and benefit from the efficiency, so wanted to give it a shot.&amp;nbsp; For now, I just moved by footnote to a subtitle to get it working.&amp;nbsp; I'm sure by the end it will be refactored into macro looping like Chris showed.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2017 13:41:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/BYVAL-doesn-t-work-in-footnote-statement/m-p/366951#M87329</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-06-14T13:41:17Z</dc:date>
    </item>
  </channel>
</rss>

