<?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 &amp;amp;Var labels in title (not var name) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/amp-Var-labels-in-title-not-var-name/m-p/349160#M80955</link>
    <description>&lt;P&gt;Sas 9.4&lt;/P&gt;&lt;P&gt;I am trying to have my variable labels show up in my&amp;nbsp;titles&amp;nbsp;instead of my&amp;nbsp;variable names.&amp;nbsp; Labels are listed in data step.&amp;nbsp; title&amp;nbsp;statement &amp;nbsp;is in proc report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Apr 2017 15:15:43 GMT</pubDate>
    <dc:creator>Whitlea</dc:creator>
    <dc:date>2017-04-11T15:15:43Z</dc:date>
    <item>
      <title>&amp;Var labels in title (not var name)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/amp-Var-labels-in-title-not-var-name/m-p/349160#M80955</link>
      <description>&lt;P&gt;Sas 9.4&lt;/P&gt;&lt;P&gt;I am trying to have my variable labels show up in my&amp;nbsp;titles&amp;nbsp;instead of my&amp;nbsp;variable names.&amp;nbsp; Labels are listed in data step.&amp;nbsp; title&amp;nbsp;statement &amp;nbsp;is in proc report.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 15:15:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/amp-Var-labels-in-title-not-var-name/m-p/349160#M80955</guid>
      <dc:creator>Whitlea</dc:creator>
      <dc:date>2017-04-11T15:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: &amp;Var labels in title (not var name)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/amp-Var-labels-in-title-not-var-name/m-p/349163#M80958</link>
      <description>&lt;P&gt;Your command&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;title1 justify=center "Idaho Adults Who Used Marijuana by &amp;amp;var, 2015";
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;specifically tells SAS to use the variable name &amp;amp;var.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You probably want to extract the label from the variable using the VLABEL function in a data step prior to PROC REPORT, and then assign that label to a macro variable. (Or, extract the label from the DICTIONARY table and then assign it to a macro variable).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;&lt;BR /&gt;    set work.brfss15;
    call symputx('label',vlabel(&amp;amp;var));
run;
title1 justify=center "Idaho Adults Who Used Marijuana by &amp;amp;label, 2015";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Apr 2017 15:50:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/amp-Var-labels-in-title-not-var-name/m-p/349163#M80958</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2017-04-11T15:50:24Z</dc:date>
    </item>
  </channel>
</rss>

