<?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: Why are labels used to name variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Why-are-labels-used-to-name-variables/m-p/745585#M233742</link>
    <description>&lt;P&gt;Variables are limited to 32 characters. Which may not be enough to make nice text to describe something.&lt;/P&gt;
&lt;P&gt;Labels can be much longer and don't have the limitations of which characters can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Print by default does not print the label. You have to ask for that with the LABEL option on the Proc Statement. Wizards and widgets may default to the label (or using that option).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many other procedures will use the label when one is available by default.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jun 2021 19:09:09 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-06-03T19:09:09Z</dc:date>
    <item>
      <title>Why are labels used to name variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-are-labels-used-to-name-variables/m-p/745565#M233724</link>
      <description>&lt;P&gt;In reading others programs, I have seen that people use labels (I see this by running the proc contents step).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;In the documentation:&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1r8ub0jx34xfsn1ppcjfe0u16pc.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/lestmtsref/n1r8ub0jx34xfsn1ppcjfe0u16pc.htm&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;it is clear how you do labels. But it does not say why you would like to use it.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;My question is, why would I like to use labels?&lt;BR /&gt;&lt;BR /&gt;Also, when for instance printing out a data set, the labels rather than the "actual variable name" is displayed. Why? Is this always the case?&lt;BR /&gt;&lt;BR /&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 17:58:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-are-labels-used-to-name-variables/m-p/745565#M233724</guid>
      <dc:creator>SasStatistics</dc:creator>
      <dc:date>2021-06-03T17:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: Why are labels used to label variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-are-labels-used-to-name-variables/m-p/745566#M233725</link>
      <description>&lt;P&gt;Contrary to the subject line you typed, labels do not "name" variables, they add additional information that can make output much more readable in most situations. If you have a variable with a cryptic name, such as ANWTQZ, it would make a lot more sense to have a label appear in the output that says "Animal Weight Using Supplement QZ".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, my question is: why would you NOT use labels?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you don't want labels to appear (why not?) then you can use&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options nolabel;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to turn them off before creating output.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 18:09:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-are-labels-used-to-name-variables/m-p/745566#M233725</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-06-03T18:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why are labels used to name variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Why-are-labels-used-to-name-variables/m-p/745585#M233742</link>
      <description>&lt;P&gt;Variables are limited to 32 characters. Which may not be enough to make nice text to describe something.&lt;/P&gt;
&lt;P&gt;Labels can be much longer and don't have the limitations of which characters can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Print by default does not print the label. You have to ask for that with the LABEL option on the Proc Statement. Wizards and widgets may default to the label (or using that option).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many other procedures will use the label when one is available by default.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 19:09:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Why-are-labels-used-to-name-variables/m-p/745585#M233742</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-06-03T19:09:09Z</dc:date>
    </item>
  </channel>
</rss>

